Sound not playing sometimes. Why?

Barry Levine themacguy at macosx.com
Fri Nov 15 12:12:01 EST 2002


I have a stack with a player object. No matter how I assign the 
fileName property or play the sound (via transcript or the message 
box), I have at least one audio file that will not play some of the 
time. My audio files are all AIF 22KHz, 16bit, mono.

It was suggested that I first set the fileName to empty and then re-set 
the property to the correct name. I've tried this. Also tried playing 
the "empty" player before re-setting the fileName property. No luck.

I've tried "pre-playing" the sound (playing it with the playLoudness 
set to 0) and then playing it at the proper volume. No luck.

I've found some consistency:

Play the sound the first time and it will fail (even if played twice in 
one handler).
Play the same sound the second time (without changing the fileName to 
something else and back again) and it plays fine.
Change the fileName property to some other audio file and it plays 
(with the other sound).
Change it back to the original fileName and it will fail to play. Play 
it again (another event triggering the same handler) and it plays fine.

I've even tried playing the sound TWICE in one handler (with no "wait" 
delay between) and the same consistency applies.

What can I do to work around this? Another audio format? Will Rev 2.0 
resolve it?

Thanks,
Barry




More information about the use-livecode mailing list