|
-
Jan 22nd, 2000, 03:52 AM
#1
Thread Starter
Junior Member
I've recently programmed a small game which is part of a program, nothing fancy (no DirectX and stuff), in which I use an API call to play sounds. I have this background loop (a wave file) which doesn't stop playing after I close the window, while I've let the program play (both loop AND normal) an empty wave file (about 2 secs of silence) on the unload event of the form.
------------------
Doomstar
http://come.to/Doomstar
-
Jan 22nd, 2000, 07:07 AM
#2
Try putting a DoEvents statement inside the sound loop.
------------------
Marty
Can you buy an entire chess set in a pawn shop?
-
Jan 22nd, 2000, 07:56 AM
#3
The Sound should be stopped as soon as your App is unloaded, perhaps you have another form, or some other Routine running which is keeping the App in Memory and not Unloading properly?
To Force a WAV to Stop, use the SND_PURGE Constant with the sndPlaySound API, ie.
Code:
Private Sub Form_Unload()
Call sndPlaySound("", SND_PURGE)
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|