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
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