Advertisement

Problems with PlaySound( )

Started by April 08, 2002 11:43 AM
0 comments, last by savagerx 22 years, 8 months ago
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
never name your macros or functions FUNCTION1 or FUNCTION2 or anything that undescriptive ^^. Other than that I cant help yas (dont work with sound) .sen
"I want to make a simple MMORPG first" - Fenryl

This topic is closed to new replies.

Advertisement