Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
608f63b2
Commit
608f63b2
authored
May 01, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport [15494]
parent
14454de5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+7
-8
No files found.
modules/audio_output/alsa.c
View file @
608f63b2
...
@@ -818,6 +818,8 @@ static void ALSAFill( aout_instance_t * p_aout )
...
@@ -818,6 +818,8 @@ static void ALSAFill( aout_instance_t * p_aout )
/* Here the device should be either in the RUNNING state.
/* Here the device should be either in the RUNNING state.
* p_status is valid. */
* p_status is valid. */
#if 0
/* This apparently does not work correctly in Alsa 1.0.11 */
snd_pcm_status_get_tstamp( p_status, &ts_next );
snd_pcm_status_get_tstamp( p_status, &ts_next );
next_date = (mtime_t)ts_next.tv_sec * 1000000 + ts_next.tv_usec;
next_date = (mtime_t)ts_next.tv_sec * 1000000 + ts_next.tv_usec;
if( next_date )
if( next_date )
...
@@ -826,19 +828,16 @@ static void ALSAFill( aout_instance_t * p_aout )
...
@@ -826,19 +828,16 @@ static void ALSAFill( aout_instance_t * p_aout )
* 1000000 / p_aout->output.output.i_rate;
* 1000000 / p_aout->output.output.i_rate;
}
}
else
else
#endif
{
{
/* With screwed ALSA drivers the timestamp is always zero;
/* With screwed ALSA drivers the timestamp is always zero;
* use another method then */
* use another method then */
snd_pcm_sframes_t
delay
;
snd_pcm_sframes_t
delay
=
0
;
ssize_t
i_bytes
=
0
;
ssize_t
i_bytes
=
0
;
if
(
!
snd_pcm_delay
(
p_sys
->
p_snd_pcm
,
&
delay
)
)
snd_pcm_delay
(
p_sys
->
p_snd_pcm
,
&
delay
);
{
next_date
=
mdate
()
+
(
mtime_t
)(
delay
)
*
1000000
/
i_bytes
=
snd_pcm_frames_to_bytes
(
p_sys
->
p_snd_pcm
,
delay
);
p_aout
->
output
.
output
.
i_rate
}
next_date
=
mdate
()
+
(
mtime_t
)
i_bytes
*
1000000
/
p_aout
->
output
.
output
.
i_bytes_per_frame
/
p_aout
->
output
.
output
.
i_rate
*
p_aout
->
output
.
output
.
i_frame_length
;
*
p_aout
->
output
.
output
.
i_frame_length
;
}
}
}
}
...
...
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