Beispiel #1
0
        /// <summary>
        /// Copy and gain to an interleaved float[]
        /// </summary>
        public void GainCopyToInterlaced(float[] destinationArray, int destinationOffset, int sourceIndex, int length, GATChannelGain channelGain)
        {
            sourceIndex        = sourceIndex + _offset;
            length             = sourceIndex + length;
            destinationOffset += channelGain.ChannelNumber;

            while (sourceIndex < length)
            {
                destinationArray[destinationOffset] = _parentArray[sourceIndex] * channelGain.Gain;
                destinationOffset += GATInfo.NbOfChannels;
                sourceIndex++;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Additive copy and gain to an interleaved float[] with extra gain parameter.
        /// </summary>
        public void GainMixToInterlaced( float[] destinationArray, int destinationOffset, int sourceIndex, int length, GATChannelGain channelGain, float igain )
        {
            sourceIndex = sourceIndex + _offset;
            length 		= sourceIndex + length;
            destinationOffset += channelGain.ChannelNumber;
            float appliedGain = igain * channelGain.Gain;

            while( sourceIndex < length )
            {
                destinationArray[ destinationOffset ] += _parentArray[sourceIndex] * appliedGain;
                destinationOffset += GATInfo.NbOfChannels;
                sourceIndex++;
            }
        }