Skip to content

Commit

Permalink
pcm: document interaction of drain silence and sw silence
Browse files Browse the repository at this point in the history
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: #381
Signed-off-by: Zeno Endemann <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
z-s-e authored and perexg committed Jan 29, 2024
1 parent f48dd3a commit ffed4f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pcm/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ffed4f3

Please sign in to comment.