J
Jovo Mirkovic
Hi,
We are working on some application in DirectX, and we are using
DirectSound, like this
Public Sub playSound(ByVal isloop As Boolean, ByVal fileName As
String)
Try
stopSound()
sound = New
Microsoft.DirectX.DirectSound.SecondaryBuffer(fileName, soundDevice)
If isloop Then
sound.Play(0, DirectSound.BufferPlayFlags.Looping)
Else
sound.Play(0, DirectSound.BufferPlayFlags.Default)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
and that is OK, but we have problem, because sonund stop every time when
form lost focus...
Any idea?
Thanks,
Jovo
We are working on some application in DirectX, and we are using
DirectSound, like this
Public Sub playSound(ByVal isloop As Boolean, ByVal fileName As
String)
Try
stopSound()
sound = New
Microsoft.DirectX.DirectSound.SecondaryBuffer(fileName, soundDevice)
If isloop Then
sound.Play(0, DirectSound.BufferPlayFlags.Looping)
Else
sound.Play(0, DirectSound.BufferPlayFlags.Default)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
and that is OK, but we have problem, because sonund stop every time when
form lost focus...

Any idea?
Thanks,
Jovo