Пример #1
0
        private unsafe float ProcessDepopMix(float *buffer, float depopValue, uint sampleCount)
        {
            if (depopValue < 0)
            {
                depopValue = -depopValue;

                for (int i = 0; i < sampleCount; i++)
                {
                    depopValue = FloatingPointHelper.MultiplyRoundDown(Decay, depopValue);

                    buffer[i] -= depopValue;
                }

                return(-depopValue);
            }
            else
            {
                for (int i = 0; i < sampleCount; i++)
                {
                    depopValue = FloatingPointHelper.MultiplyRoundDown(Decay, depopValue);

                    buffer[i] += depopValue;
                }

                return(depopValue);
            }
        }