Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
bcd564d4
Commit
bcd564d4
authored
Dec 06, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: do not prepend zeroes for S/PDIF, sleep instead
parent
fe7d26ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+5
-1
No files found.
modules/audio_output/alsa.c
View file @
bcd564d4
...
...
@@ -602,7 +602,7 @@ static void Play (audio_output_t *aout, block_t *block)
if
(
state
!=
SND_PCM_STATE_RUNNING
)
{
delay
=
block
->
i_pts
-
(
mdate
()
+
delay
);
if
(
delay
>
0
)
if
(
delay
>
0
&&
aout
->
format
.
i_format
!=
VLC_CODEC_SPDIFL
)
{
frames
=
(
delay
*
aout
->
format
.
i_rate
)
/
CLOCK_FREQ
;
msg_Dbg
(
aout
,
"prepending %ld zeroes"
,
frames
);
...
...
@@ -612,8 +612,12 @@ static void Play (audio_output_t *aout, block_t *block)
{
snd_pcm_writei
(
pcm
,
pad
,
frames
);
free
(
pad
);
delay
=
0
;
}
}
/* Lame fallback if zero padding does not work */
if
(
delay
>
0
)
mwait
(
block
->
i_pts
-
delay
);
}
else
aout_TimeReport
(
aout
,
block
->
i_pts
-
delay
);
...
...
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