Hi All,
I am using Directx to produce 3D sound Its working fine, But the only problem is I am not able to produce sound at a time in left or right speaker.
Could someone please tell me what value of vector I should set to produce sound in left or right speaker.
code is here:
Code:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Try
DSDevice = New DirectSound.Device()
DSDevice.SetCooperativeLevel(Handle, DirectSound.CooperativeLevel.Normal)
Dim BufferDesc As DirectSound.BufferDescription = New DirectSound.BufferDescription()
BufferDesc.Control3D = True
BufferDesc.GlobalFocus = True
OpenFileDialog1.ShowDialog()
sFileName = OpenFileDialog1.FileName
Dim TheSound As DirectSound.SecondaryBuffer = New DirectSound.SecondaryBuffer(sFileName, BufferDesc, DSDevice)
Dim The3DBuffer As DirectSound.Buffer3D = New DirectSound.Buffer3D(TheSound)
The3DBuffer.Position = GetVector3(0, 0, 0)
TheSound.Play(0, BufferPlayFlags.Default)
Catch ex As Exception
sErrmsg = ex.Message & ex.ToString()
End Try
End Sub
What Value I should pass to the GetVector3(0, 0, 0) so it can produce sound in left or right speaker.
Thanks in Advance
-Joseph