GAudio.GATFixedPanInfo.PanMixProcessingBuffer C# (CSharp) Method

PanMixProcessingBuffer() public method

This method may be used if you subscribe to GATPlayer's mixing delegate and choose to override default mixing.
public PanMixProcessingBuffer ( IGATBufferedSample sample, int length, float audioBuffer, float gain = 1f ) : void
sample IGATBufferedSample
length int
audioBuffer float
gain float
return void
        public override void PanMixProcessingBuffer( IGATBufferedSample sample, int length, float[] audioBuffer, float gain = 1f )
        {
            int i;

            if( gain == 1f )
            {
                for( i = 0; i < channelGains.Count; i++ )
                {
                    sample.ProcessingBuffer.GainMixToInterlaced( audioBuffer, sample.OffsetInBuffer * GATInfo.NbOfChannels, 0, length, channelGains[i] );
                }
            }
            else
            {
                for( i = 0; i < channelGains.Count; i++ )
                {
                    sample.ProcessingBuffer.GainMixToInterlaced( audioBuffer, sample.OffsetInBuffer * GATInfo.NbOfChannels, 0, length, channelGains[i], gain );
                }
            }
        }