Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
3e00fa13
Commit
3e00fa13
authored
Aug 11, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PulseAudio: improve resampling formula
...for good this time (yeah right).
parent
a31dcff4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+3
-2
No files found.
modules/audio_output/pulse.c
View file @
3e00fa13
...
...
@@ -272,9 +272,10 @@ static void stream_latency_cb(pa_stream *s, void *userdata)
sync
=
true
;
/* Compute playback sample rate */
/* This is empirical. Feel free to define something smarter. */
/* This is empirical (especially the shift values).
* Feel free to define something smarter. */
int
adj
=
sync
?
(
outrate
-
inrate
)
:
outrate
*
(
delta
+
change
)
/
(
CLOCK_FREQ
<<
4
);
:
outrate
*
(
(
delta
>>
4
)
+
change
)
/
(
CLOCK_FREQ
<<
2
);
/* This avoids too quick rate variation. It sounds really bad and
* causes unstability (e.g. oscillation around the correct rate). */
int
limit
=
inrate
>>
10
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment