[linux-audio-dev] alsa, oss , efficiency?

James Courtier-Dutton James at superbug.co.uk
Thu Nov 2 21:04:14 UTC 2006


James Courtier-Dutton wrote:
> lemmel wrote:
>> Le jeudi 02 novembre 2006 09:44, vous avez écrit :
>>> Were there samples missing at the beginning or at the end?
>> At the end
>>>> and even randomly truncated,
>>> What do you mean with "randomly"?
>> In order to lighten, I will take an example : a 3 secondes sound file.
>> 0------------------------------>1.5---------------------------------------->3s 
>>
>> a beep on a channel            a beep on the other channel
>>
>> the sound can be truncated at this time position : 1.5, 2, even at 1.
>>
>> It is rather difficult to be accurate for the real duration is small 
>> (the wav file is available at 
>> http://maleelma.free.fr/lemmel/test.wav.bz2), and I am focusing on the 
>> choice of a sound system.
>>> What sound card/kernel version/ALSA version are you using?
>> see an another post of mine.
>>
> 
> We, unless this is actually reported to the alsa bug tracker at 
> http://alsa-project.org/  it might not get fixed or even investigated 
> further.
> 
> 
> 
This is probably an application problem. There is a special case that if 
the application does not write a full period to the sound card before 
calling snd_pcm_drain(), the last samples(incomplete period) written 
might not be played.

The recommended way to use the sound card drivers is to use a callback 
method. The callback will ask for a period at a time, so it is made 
clear to the application writer that they HAVE to send an entire period.

This might help you.

James


James




More information about the Linux-audio-dev mailing list