Problems with PlaySound( )
Basically, I have 2 problems but for the sake of clarity, I shall first define the following terms:
#define
PlaySound(MAKEINTRESOURCE(ID_BGSND),hInstance,
SND_RESOURCE|SND_ASYNC) FUNCTION1
#define
PlaySound(MAKEINTRESOURCE(ID_BGSND),hInstance,
SND_RESOURCE|SND_ASYNC|SND_LOOP) FUNCTION1B
//similar to FUNCTION1 but plus SND_LOOP
#define
PlaySound(MAKEINTRESOURCE(ID_BANG1),hInstance,
SND_RESOURCE|SND_ASYNC) FUNCTION2
Okay, now's the question one:
First, I ran FUNCTION1 in my WM_CREATE: case, I can hear the Background wav and let's call it sound x. But after I ran FUNCTION2, sound x is gone! What can be the possible reason and how I may rectify it?
Question two:
After I ran FUNCTION1B, what should I do to safely stop it?
What I've tried and failed:
PlaySound(NULL,hInstance,SND_ASYNC|SYN_RESOURCE);
Result = System hangs
PlaySound(NULL,hInstance,SND_PURGE);
Result = Program exits but the sound is still there!
I welcome all comments and advice especially.
The road may be long, wind may be rough. But with a will at heart, all shall begone. ~savage chant
[edited by - savagerx on April 8, 2002 12:45:11 PM]
The road may be long, wind may be rough. But with a will at heart, all shall begone. ~savage chant
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement