On 06/27/12 13:07, Clemens Ladisch wrote: > Bryan Ischo wrote: >> OK I think I figured out a way: > This is how mplayer does it. > Also - thank you for your response - and one more question: I did some experimentation and on two systems that I have access to (one which apparently has better sound hardware and was always more resilient against popping noises than the other, no matter what technique I use), I can't really tell any significant difference between the two alternate approaches that I use: 1. Allow underrun (by not setting up the stop threshold, silence threshold, and silence size), detect when underrun occurs by the return status of snd_pcm_writei, correct by calling snd_pcm_prepare and re-attempting the same write again. 2. Play silence unstead of underrun by setting up the stop threshold, silence threshold, and silence size appropriately, detecting when silence has been played out (an underrun "would have occurred") using snd_pcm_avail() right before snd_pcm_writei and correct using snd_pcm_forward Both end up sounding exactly the same over a variety of tests. My question is, are both techniques essentially the same from the perspective of ALSA? The results are so similar that I can't shake the feeling that both techniques result in basically the same set of actions by ALSA with respect to the audio hardware, and thus there is no reason to favor one technique over the other. Thank you, 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