Programming Visual Basic .net with Direct X
- From: Gilbert Neiva <gneiva@xxxxxxx>
- To: programmingblind@xxxxxxxxxxxxx
- Date: Wed, 31 Oct 2007 20:44:31 -0600
I have a problem. I am just starting to learn to program Visual Basic .Net with
DirectX. I am trying to learn 3D Sound programming, but I just can't get the
listenner to work right. Here is what I have in the forms_Load procedure.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim DsDevice As DirectSound.Device = New DirectSound.Device
Dim BuffDesc As DirectSound.BufferDescription = New
DirectSound.BufferDescription
DsDevice.SetCooperativeLevel(Handle, DirectSound.CooperativeLevel.Priority)
BuffDesc.PrimaryBuffer = True
BuffDesc.Control3D = True
Dim Primary As DirectSound.Buffer = New DirectSound.Buffer(BuffDesc, DsDevice)
Dim Listener As DirectSound.Listener3D = New DirectSound.Listener3D(Primary)
Listener.Position = (9, 9, 0)
End Sub
I have many questions. How do you set a listenners orientation, where a
listenner is facing a certain direction? Did I do the listenner.position right.
When I try to run the program, I get errors. I think it has to do with the
listenner.position. Are there any books that deal with 3D sound with Visual
Basic. I checked out most of the books out there, but they all deal with Direct
X graphics. I need to learn how to program 3D sound with VB .Net. Can anyone
out there help?
Gilbert Neiva
Other related posts:
- » Programming Visual Basic .net with Direct X