Re: Reproducible pops on some hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/26/12 10:15, Bryan Ischo wrote:
>
> snd_pcm_sw_params_get_boundary(sw_params, &boundary);
>
> // Never underrun; allow the sound card to just keep playing whatever 
> is in the ring
> // buffer, including re-playing old audio if new audio is not available
> snd_pcm_sw_params_set_stop_threshold(pcmM, sw_params, boundary);
>
> // Tell ALSA to zero out just-played audio in the ring buffer, which 
> means that if the
> // sound card does loop in the ring buffer into an area that doesn't 
> have new sound
> // data yet (i.e. we weren't able to deliver real-time audio fast 
> enough), silence will
> // result instead of repeated audio.
> snd_pcm_sw_params_set_silence_size(pcmM, sw_params, boundary);
>
> // The ALSA docs say that silence_threshold has to be set this way if 
> silence_size is
> // set to boundary
> snd_pcm_sw_params_set_silence_threshold(pcmM, sw_params, 0);
>
> The problem is, the above doesn't work.  It just results in infinite 
> silence no matter what sound I try to write into the buffer.

To be clearer: the above works until the first time that there would 
have been an underrun (i.e. silence is played out instead of an 
underrun), after which only silence is ever played.

If I disable the above in my implementation, then I get an underrun and 
have to re-prepare the pcm.  If I enable the above, at the moment that I 
would have gotten the underrun, instead I get silence forever thereafter.

Bryan


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux