Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PlaySound only plays sometimes.

Status
Not open for further replies.

KAGEY

Programmer
Apr 30, 2003
2
0
0
GB
I have a problem when trying to play wavs in a sequence, i.e. 2 seperate wavs, one with "Hello", second with "There" and string them so "hello" is played, followed by "there"
I am using :

if( !PlayedSound )
{
PlaySound(filename1, NULL, SND_FILENAME | SND_ASYNC );
PlayedSound = TRUE;
}
else
if( PlaySound( filename2, NULL, SND_FILENAME | SND_ASYNC | SND_NOSTOP )
{
....
PlayedSound = FALSE;
etc...
}

But sometimes i get the sound, and sometimes nothing.
Sometimes there is no sound only on the first pass, then it is fine thereafter..
This is an annoying problem and i'd appreciate any help!
Thanks,
KG.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top