mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: limit silence to threshold and available size
This commit is contained in:
parent
d9e3eb49cc
commit
2fe392dd30
1 changed files with 1 additions and 1 deletions
|
|
@ -436,7 +436,7 @@ int spa_alsa_write(struct state *state, snd_pcm_uframes_t silence)
|
|||
silence = 0;
|
||||
}
|
||||
if (written == 0)
|
||||
silence = 4096;
|
||||
silence = SPA_MIN(to_write, state->threshold);
|
||||
|
||||
if (silence > 0) {
|
||||
snd_pcm_areas_silence(my_areas, offset, state->channels, silence, state->format);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue