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
47f74a83
Commit
47f74a83
authored
Nov 01, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "ALSA: request large enough buffers first (refs #10422)"
This reverts commit
4aeccbd7
.
parent
6ae2905e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
modules/audio_output/alsa.c
modules/audio_output/alsa.c
+19
-2
No files found.
modules/audio_output/alsa.c
View file @
47f74a83
...
@@ -495,6 +495,15 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
...
@@ -495,6 +495,15 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
}
}
sys
->
rate
=
fmt
->
i_rate
;
sys
->
rate
=
fmt
->
i_rate
;
#if 1
/* work-around for period-long latency outputs (e.g. PulseAudio): */
param
=
AOUT_MIN_PREPARE_TIME
;
val
=
snd_pcm_hw_params_set_period_time_near
(
pcm
,
hw
,
&
param
,
NULL
);
if
(
val
)
{
msg_Err
(
aout
,
"cannot set period: %s"
,
snd_strerror
(
val
));
goto
error
;
}
#endif
/* Set buffer size */
/* Set buffer size */
param
=
AOUT_MAX_ADVANCE_TIME
;
param
=
AOUT_MAX_ADVANCE_TIME
;
val
=
snd_pcm_hw_params_set_buffer_time_near
(
pcm
,
hw
,
&
param
,
NULL
);
val
=
snd_pcm_hw_params_set_buffer_time_near
(
pcm
,
hw
,
&
param
,
NULL
);
...
@@ -503,14 +512,22 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
...
@@ -503,14 +512,22 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
msg_Err
(
aout
,
"cannot set buffer duration: %s"
,
snd_strerror
(
val
));
msg_Err
(
aout
,
"cannot set buffer duration: %s"
,
snd_strerror
(
val
));
goto
error
;
goto
error
;
}
}
#if 0
param
=
AOUT_MIN_PREPARE_TIME
;
val = snd_pcm_hw_params_get_buffer_time (hw, ¶m, NULL);
if (val)
{
msg_Warn (aout, "cannot get buffer time: %s", snd_strerror(val));
param = AOUT_MIN_PREPARE_TIME;
}
else
param /= 2;
val = snd_pcm_hw_params_set_period_time_near (pcm, hw, ¶m, NULL);
val = snd_pcm_hw_params_set_period_time_near (pcm, hw, ¶m, NULL);
if (val)
if (val)
{
{
msg_Err (aout, "cannot set period: %s", snd_strerror (val));
msg_Err (aout, "cannot set period: %s", snd_strerror (val));
goto error;
goto error;
}
}
#endif
/* Commit hardware parameters */
/* Commit hardware parameters */
val
=
snd_pcm_hw_params
(
pcm
,
hw
);
val
=
snd_pcm_hw_params
(
pcm
,
hw
);
...
...
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