internal void Setup(AmbisonicOrder order, AmbisonicChannelOrder channelOrder, AmbisonicNormalisation normalisation, int bufferCount)
        {
            Debug.Assert(bufferCount > 1 && bufferCount < 100);
            lock (this)
            {
                _order         = order;
                _channelOrder  = channelOrder;
                _normalisation = normalisation;
                int sampleCount = Ambisonic.GetCoeffCount(order) * AudioSettings.outputSampleRate / 10;                 // 1/10 second buffer

                _activeSampleIndex = 0;
                _activeSamples     = null;
                _fullBuffers.Clear();
                _emptyBuffers.Clear();
                for (int i = 0; i < bufferCount; i++)
                {
                    float[] buffer = new float[sampleCount];
                    _emptyBuffers.Enqueue(buffer);
                }

                UpdateCoefficients();
            }
        }
Beispiel #2
0
 public static extern void UpdateAmbisonicWeights(IntPtr instance, float azimuth, float elevation, AmbisonicOrder order, AmbisonicChannelOrder channelOrder, float[] normalisationWeights);