Skip to contentSkip to conversation

snd_pcm_delay() bug

DISCUSSION Ronald S. Bultje 2 participants 2 messages May 15, 2004 – May 16, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes returns (in the second argument pointer) ridiculously high values in the range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes down to roughly 1,1E9). I'm guessing there's some kind of signed/unsigned or 32/64bit integer bug in this function? Is this a known bug? Is there a fix?

Ronald

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click

#1 lore raw
Quoted 11 lines · Ronald S. Bultje

Hi,

for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes returns (in the second argument pointer) ridiculously high values in the range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes down to roughly 1,1E9). I'm guessing there's some kind of signed/unsigned or 32/64bit integer bug in this function? Is this a known bug? Is there a fix?

Ronald

after calling snd_pcm_delay(), call snd_pcm_state() and make sure it is in RUNNING state, otherwise, values returned from snd_pcm_delay() are meaningless.

Cheers
James

-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click