mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: add api.alsa.headroom setting
Can be used to tweak the extra distance kept between the hardware and software pointers when reading and writing. See #289
This commit is contained in:
parent
abe73c9146
commit
7347b5ef05
5 changed files with 13 additions and 1 deletions
|
|
@ -605,8 +605,12 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
|
|||
CHECK(snd_pcm_hw_params_get_buffer_size_max(params, &state->buffer_frames), "get_buffer_size_max");
|
||||
CHECK(snd_pcm_hw_params_set_buffer_size_near(hndl, params, &state->buffer_frames), "set_buffer_size_near");
|
||||
|
||||
if (state->default_headroom == 0)
|
||||
state->headroom = is_batch ? period_size : 0;
|
||||
else
|
||||
state->headroom = state->default_headroom;
|
||||
|
||||
state->period_frames = period_size;
|
||||
state->headroom = is_batch ? period_size : 0;
|
||||
periods = state->buffer_frames / state->period_frames;
|
||||
|
||||
spa_log_info(state->log, NAME" %s (%s): format:%s access:%s-%s rate:%d channels:%d "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue