[alsa-devel] Playback - Overwrite buffer with silence
Nilhcraiv
nilhcraiv at gmail.com
Wed Apr 22 20:13:48 CEST 2015
Raymind wrote:
> Pulseaudio is a sound server which mix several playback streams,
> silence size may has no effect since the alsa sink may use different
> period size/buffer size or disable period wakeup when using timer
> scheduling
Then, How I can avoid under-run? I mean, If I attempt to write data in a
buffer and the under-run occurs, It takes a long time to recover the pcm
and the data must be lost. ¿how I can put silence in buffer instead of
lost data?
I have set the snd_pcm_sw_params_set_stop_threshold() to the boundary
value also, but the under-run occurs
My Playback PCM now:
INFO: Using "default" device.
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 720
period_size : 240
period_time : 5000
tstamp_mode : NONE
period_step : 1
avail_min : 240
period_event : 0
start_threshold : 720
stop_threshold : 6485183463413514240
silence_threshold: 0
silence_size : 6485183463413514240
boundary : 6485183463413514240
Regards,
More information about the Alsa-devel
mailing list