Re: [alsa-devel] Playback - Overwrite buffer with silence
Clemens wrote: It is impossible for the boundar to be zero.
In my code snd_pcm_sw_params_get_boundary(swparams, &boundary) function does not return a negative value and the boundary variable is set to zero then, the boundar is zero.
In any case, How I can put silence in buffer to avoid underrun? Do you know the answer?
Thank you in advance.
Nilhcraiv wrote:
Clemens wrote:
It is impossible for the boundar to be zero.
In my code snd_pcm_sw_params_get_boundary(swparams, &boundary) function does not return a negative value
But an earlier function probably did.
Regards, Clemens
Clemens wrote: But an earlier function probably did.
It is the first call to " snd_pcm_sw_params_get_boundary" function and it return zero. If I use the function after "writei" then, the boundary value is a large number. What boundary means when the value is a large number?
Regards,
Nilhcraiv wrote:
Clemens wrote:
But an earlier function probably did.
It is the first call to " snd_pcm_sw_params_get_boundary" function and it return zero.
There are lots of other function calls.
Regards, Clemens
Clemens wrote: But an earlier function probably did.
It is the first call to " snd_pcm_sw_params_get_boundary" function and it
return zero. If I use the function after "writei" then, the boundary value is a large number. What boundary means when the value is a large number?
You have to add snd_pcm_dump() after snd_pcm_hw_params() to dump those paramters accepted by your default device
Not all default device support two periods per buffer as you did not explicitly set periods or period_size
Most functions which you used can return error
participants (3)
-
Clemens Ladisch
-
Nilhcraiv
-
Raymond Yau