Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
a21dd90d
Commit
a21dd90d
authored
Jul 23, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flawed logic
parent
3d432688
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
modules/audio_output/pulse.c
modules/audio_output/pulse.c
+6
-6
No files found.
modules/audio_output/pulse.c
View file @
a21dd90d
...
...
@@ -193,14 +193,14 @@ static void stream_latency_cb(pa_stream *s, void *userdata)
if
(
adj
<
-
ADJUST_MAX
)
adj
=
-
ADJUST_MAX
;
if
(
abs
(
adj
)
<
(
inrate
>>
10
))
adj
=
0
;
/* favor native rate to avoid resampling */
unsigned
outrate
=
sys
->
rate
-
adj
;
/* Favor native rate to avoid resampling (FIXME: really a good idea?) */
if
(
abs
(
outrate
-
inrate
)
<
(
inrate
>>
10
))
outrate
=
inrate
;
/* This keeps the effective rate within specified range
* (+/-AOUT_MAX_RESAMPLING% - see <vlc_aout.h>) of the nominal rate. */
unsigned
outrate
=
inrate
-
adj
;
const
int
limit
=
inrate
*
AOUT_MAX_RESAMPLING
/
100
;
if
(
outrate
>
inrate
+
limit
)
outrate
=
inrate
+
limit
;
if
(
outrate
<
inrate
-
limit
)
...
...
@@ -392,8 +392,8 @@ static void Play(aout_instance_t *aout)
}
#if 0 /* Fault injector to test underrun recovery */
static unsigned u = 0;
if ((++u %
5
00) == 0) {
static
volatile
unsigned u = 0;
if ((++u %
10
00) == 0) {
msg_Err(aout, "fault injection");
pa_operation_unref(pa_stream_flush(s, NULL, NULL));
}
...
...
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