1. I can't sync the sound in my game (Win)

Hi,

I'm making a slot machine game for Windows and I can't get the .wav sound
of the reels stopping to synchronize with the graphics.  I tried modifying
Win32Lib (.45r) by changing the line

result = c_func( xPlaySound, {file_string, NULL, or_bits(SND_FILENAME,
SND_ASYNC)})
to
result = c_func( xPlaySound, {file_string, NULL, or_bits(SND_FILENAME,
SND_SYNC)})

and adding the constant
SND_SYNC    = #00000000

and the .wavs went from playing all at once to playing with a slight delay
between them but it still isn't close to being syncronized.  The sound
effects are set in the code to play after the reels stop.  I even tried
using the time() function to get it to sync but that didn't go anywhere.
Can you help?

Thanks,
Jeramie

new topic     » topic index » view message » categorize

2. Re: I can't sync the sound in my game (Win)

If you *just* want to stop a current .wav file from playing, try using this
directly.

atom junk
 junk = c_func( xPlaySound, { NULL, NULL, NULL} )

Wolf

new topic     » goto parent     » topic index » view message » categorize

3. Re: I can't sync the sound in my game (Win)

Hi everybody,

I probably wasn't clear.  I'm not trying to stop the .wav file from
playing, I'm trying to get the .wav file to play after each of the 9 reels
of the slot machine stops, but what it's doing now is playing the .wav file
9 times before the first reel stops.  The stopping of the reels isn't
synchronized with the sound effect of a stopping-reel.  Can anyone help?

Thanks for the idea anyway Wolf.
Sincerely,
Jeramie

At 07:19 PM 8/13/00 -0400, you wrote:
>If you *just* want to stop a current .wav file from playing, try using this
>directly.
>
>atom junk
> junk = c_func( xPlaySound, { NULL, NULL, NULL} )
>
>Wolf
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu