Sound problems ... in my first game ...
Posted: Sun Jan 23, 2011 12:56 pm
Hi all,
For my first 2D game I used some sounds and .wav background music.
When I start the game the music plays well.
When the game is over, the sound goes on and on...
Only if I quit the game the sound stop ... ???
Windows XP Home SP2
1) First I INITSOUND:
2) I Catch the sound from memory
3) I play the sound
the game logic
I play the game ...
4) When 'GAME OVER' ... I Stop the sound... !!!
The sound do not stop at all ...
I used (a)
and I used (b)
PS: The game can be found here ... "My first game"
http://www.marc-systems.be/pvg-3dstudio ... me_001.exe
I use on this computer:
- WIN XP Home (32 bits) (sp2)
- AMD Athlon XP-M 2400+ at 1.8 GHz with 1GB RAM
- GPU ATI-RADEON 9800 PRO with 128MB ram
- SOUND = C-Media AC97 Audio Device
- DIRECTX = DirectX 9.0c installed
- PURE BASIC = PB 4.51 RC 2
- MOUSE = IKARI steel serie laser mouse (USB)
- anti virus = NOD32
Thanks,
marc,
For my first 2D game I used some sounds and .wav background music.
When I start the game the music plays well.
When the game is over, the sound goes on and on...
Only if I quit the game the sound stop ... ???
Windows XP Home SP2
1) First I INITSOUND:
Code: Select all
If InitSound() = 0
MessageRequester("Error", "Can't open DirectX 7 or no sound card is available", 0)
Goto einde
Else
Goto Start_Of_Game
EndIf
Code: Select all
CatchSound(Sound_Elektro_Num, ?Sound_Elektro)
Code: Select all
PlaySound(Sound_Elektro_Num, #PB_Sound_MultiChannel | #PB_Sound_Loop, 50)
SoundPan(Sound_Elektro_Num, 0)
I play the game ...
4) When 'GAME OVER' ... I Stop the sound... !!!
The sound do not stop at all ...
I used (a)
Code: Select all
StopSound(Sound_Elektro_Num)
Code: Select all
StopSound(-1) = stop all playing sounds
http://www.marc-systems.be/pvg-3dstudio ... me_001.exe
I use on this computer:
- WIN XP Home (32 bits) (sp2)
- AMD Athlon XP-M 2400+ at 1.8 GHz with 1GB RAM
- GPU ATI-RADEON 9800 PRO with 128MB ram
- SOUND = C-Media AC97 Audio Device
- DIRECTX = DirectX 9.0c installed
- PURE BASIC = PB 4.51 RC 2
- MOUSE = IKARI steel serie laser mouse (USB)
- anti virus = NOD32
Thanks,
marc,