I got an Sound.Object playing a stereo sound from a Soundbuffer.
Now I want to set the .Position property. But what scales are expected for the vector's elements? Is it something between 0..1.0? Or maybe something like 0..1000?
I tried to produce some kind of 2D-Sound: If a rocket flies by on the left side the sound should be much louder on the left side then on the right side. I made it like this:
With New Sound (daBuffer)
.Position = New Vector3((rock_x-self_x)/app.width, (rock_y-self_y)/app.height, 0)
.RelativeToListener = true
.Play()
End With
So, rock_XY=Rocket, self_XY=listener. The .Position gets a new value relative to the listener and by setting .RelativeToListener that should be applied to the sound.
But sadly the volume on both speakers is the same...so no 2D-Sound =(
Am I doing wrong or isnt it supposed to support that?
PS: rock_XY and self_XY are screen coordinates, so vector3.X and .Y are between 0...1.