Xtreme
04-02-2001, 01:23 PM
i am using direct x 7.
i am programming a game similar to bomberman.
however the way in which i am playing the sound effects (.wav) it cuts off or doesnt sound if another one is playing. I thought that direct x could do more that one .wav at once? Does anyone have some code that would play multiple .wavs at once if called?
my code looks like this:
Private Function Play_Sound(track)
If track = "explode" Then
track = ""
DBuffer(0).Play DSBPLAY_DEFAULT
End If
If track = "destroy" Then
track = ""
DBuffer(1).Play DSBPLAY_DEFAULT
End If
end sub
this code executes when a sound event is supossed to happen i call the sub with the appropriate track. however i cannot hear both sounds at once!
thanks
i am programming a game similar to bomberman.
however the way in which i am playing the sound effects (.wav) it cuts off or doesnt sound if another one is playing. I thought that direct x could do more that one .wav at once? Does anyone have some code that would play multiple .wavs at once if called?
my code looks like this:
Private Function Play_Sound(track)
If track = "explode" Then
track = ""
DBuffer(0).Play DSBPLAY_DEFAULT
End If
If track = "destroy" Then
track = ""
DBuffer(1).Play DSBPLAY_DEFAULT
End If
end sub
this code executes when a sound event is supossed to happen i call the sub with the appropriate track. however i cannot hear both sounds at once!
thanks