I want to play wav Sound.

Hi, i want to play two of *.wav files.
And now, I am using PlaySound(), and StopSound();
It exactly works only if I play one file.
But, I played two files, didn't work.
here is some codes blow.
Function A()
m_hThread_FAud = CreateThread(NULL, 0, ThreadFunc_FAud, this, 0, NULL);
m_hThread_SAud = CreateThread(NULL, 0, ThreadFunc_SAud, this, 0, NULL);

DWORD WINAPI ThreadFunc_FAud(LPVOID prc)
{PlaySound(FIRST_AUDIO, 0, SND_FILENAME | SND_ASYNC);}
DWORD WINAPI ThreadFunc_FAud(LPVOID prc)
{PlaySound(SECOND_AUDIO, 0, SND_FILENAME | SND_ASYNC);}

I think that this seems logically working.
If the functions, PlaySound()/StopSound() doesn't support to play more than two files,
is there any other functions that can play two or more audio files??

Any ideas??
thanks :)
Last edited on
Why are you passing this as an argument to the thread? You aren't even passing the handle of the sound file to PlaySound(), you're passing '0'. How does this work at all?
Obviously Windows won't leave you play more than one file at once.
Once again, check this: www.un4seen.com .
I think i'll get a new account called BASS_Sponsor.
Topic archived. No new replies allowed.