gerardorosiles / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

X3DAUDIO issue or a lack of understanding on my part? #793

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Hi, 

I am using the X3DAUDIO namespace of the March 2011 release of SlimDX and 
trying to get the matrix coefficients to calculate, but I am getting a result 
of 0 for each of my speakers.

            Dim emitter As X3DAudio.Emitter = New X3DAudio.Emitter 
            emitter.ChannelCount = 1 
            emitter.Position = New Vector3(0.0F, 0.0F, 0.0F) ' location, deliberately centered for testing
            emitter.OrientFront = New Vector3(0.0F, 0.0F, 1.0F) ' front 
            emitter.OrientTop = New Vector3(0.0F, 1.0F, 0.0F) ' top 
            emitter.Velocity = Vector3.Zero 
            Main.Engine.Listener.Position = New Vector3(0.0F, 0.0F, 0.0F) ' location, deliberately centered for testing 
            Main.Engine.Listener.OrientFront = New Vector3(0.0F, 0.0F, 1.0F) ' front 
            Main.Engine.Listener.OrientTop = New Vector3(0.0F, 1.0F, 0.0F) ' top 
            Dim settings As X3DAudio.DspSettings = Main.Engine.Audio3D.Calculate(Main.Engine.Listener, emitter, X3DAudio.CalculateFlags.Matrix, 1, 6) 
            Dim m() As Single = settings.MatrixCoefficients 

If I do the above, m has a result of 

    (0): 0.2 
    (1): 0.2 
    (2): 0.2 
    (3): 0.0 
    (4): 0.2 
    (5): 0.2 

which is an even distribution of the sound across the 5 speakers. The listener 
is in the same position as the emitter.

However, if I alter the emitter's position ever so slightly to the right of the 
listener, say to new vector3(0, 0, 0.5f) I get a result of 

    (0): 0.0 
    (1): 0.0 
    (2): 0.0 
    (3): 0.0 
    (4): 0.0 
    (5): 0.0 

I can't for the life of me see what I am doing wrong, if anything, and I have 
just upgraded to the March release in the hope that the problem had been fixed.

Is the X3DAUDIO fully implemented under SlimDX? Or am I just misunderstanding 
the emitter's and listener's Position property?

Richy 

Original issue reported on code.google.com by moviekni...@gmail.com on 25 Apr 2011 at 6:45

GoogleCodeExporter commented 9 years ago
Disregard please. I am now getting somewhere, no panning of sounds yet but at 
least I am getting coefficients being calculated.

Cheers

Original comment by moviekni...@gmail.com on 26 Apr 2011 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by Mike.Popoloski on 3 May 2011 at 10:09