Question on sound in a game of mine [Archive] - C Board

PDA

View Full Version : Question on sound in a game of mine


Vanished
12-09-2002, 03:47 AM
I am using the PlaySound function to play a .wav file of an explosion within a Battleship game I made for class. The problem I am having is that a section of code will not run until the .wav file is done playing. I am trying to call the PlaySound function to play the .wav file while a for loop displays a flashing HIT or MISS message. But the loop won't start until after the sound has played. Is there anyway I can play the sound while the loop is executing. I am using MSVS .Net C++.

Thanks,
Van

lambs4
12-09-2002, 07:16 AM
Have you tried PlaySound(file,SND_ASYNC)?

Vanished
12-09-2002, 01:56 PM
Just what I needed, thank you soo much. I guess if I would have read the MSDN section on PlaySound a little mroe closely I would have caught that. I cut and pasted a call to PLaySound that had SND_SYNC in it :)

Van