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
8d6be5e2
Commit
8d6be5e2
authored
Mar 28, 2014
by
Adrien Maglo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AudioTrack: use the render position from the DSP to compute the delay
Do not use the frequency rate in the computation.
parent
b74e590d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
modules/audio_output/audiotrack.c
modules/audio_output/audiotrack.c
+4
-6
No files found.
modules/audio_output/audiotrack.c
View file @
8d6be5e2
...
...
@@ -206,19 +206,17 @@ static int TimeGet(audio_output_t *p_aout, mtime_t *restrict delay)
if
(
p_sys
->
at_getRenderPosition
(
&
hal
,
&
dsp
,
MUSIC
))
return
-
1
;
hal
=
(
uint32_t
)((
uint64_t
)
hal
*
p_sys
->
rate
/
44100
);
if
(
p_sys
->
samples_written
==
0
)
{
p_sys
->
initial
=
hal
;
p_sys
->
initial
=
dsp
;
return
-
1
;
}
hal
-=
p_sys
->
initial
;
if
(
hal
==
0
)
dsp
-=
p_sys
->
initial
;
if
(
dsp
==
0
)
return
-
1
;
if
(
delay
)
*
delay
=
((
mtime_t
)
p_sys
->
samples_written
-
hal
)
*
CLOCK_FREQ
/
p_sys
->
rate
;
*
delay
=
((
mtime_t
)
p_sys
->
samples_written
-
dsp
)
*
CLOCK_FREQ
/
p_sys
->
rate
;
return
0
;
}
...
...
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