]> git.alsa-project.org Git - alsa-lib.git/commitdiff
pcm: document interaction of drain silence and sw silence
authorZeno Endemann <zeno.endemann@mailbox.org>
Mon, 29 Jan 2024 14:02:44 +0000 (15:02 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 29 Jan 2024 16:15:36 +0000 (17:15 +0100)
I'm not sure this is the best way to describe the interaction, but I think
this needs to be mentioned in some form at least.

Closes: https://github.com/alsa-project/alsa-lib/pull/381
Signed-off-by: Zeno Endemann <zeno.endemann@mailbox.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm.c

index bd819a00348ce2fd786bb68359ab61cf069cd63c..ab3bbda786f045ecfcb16a45437a3781609f1448 100644 (file)
@@ -6895,6 +6895,10 @@ int snd_pcm_sw_params_get_silence_threshold(const snd_pcm_sw_params_t *params, s
  * underrun is nearer than silence threshold (see 
  * #snd_pcm_sw_params_set_silence_threshold)
  *
+ * When drain silence (see #snd_pcm_hw_params_get_drain_silence) is disabled,
+ * this will also apply for draining, i.e. silence is written also when the
+ * drain end is nearer than the silence threshold.
+ *
  * The special case is when silence size value is equal or greater than
  * boundary. The unused portion of the ring buffer (initial written samples
  * are untouched) is filled with silence at start. Later, only just processed