GAudio.GATEnvelope.ProcessSample C# (CSharp) Méthode

ProcessSample() public méthode

Immediately applies all processing properties to the passed GATData object.
public ProcessSample ( GATData sample ) : void
sample GATData
Résultat void
        public virtual void ProcessSample( GATData sample )
        {
            if( _normalize )
                sample.Normalize( _normalizeValue );

            if( _reverse )
                sample.Reverse();

            if( _fadeInSamples > 0 )
                sample.FadeIn( _fadeInSamples );

            if( _fadeOutSamples > 0 )
                sample.FadeOut( _fadeOutSamples );
        }

Usage Example

            //overridable for more cached processing in derived classes ( pitch shift )
            protected virtual void FillAndProcessData()
            {
                if (_nextPitch == 1d)
                {
                    FillWithSampleData(envelope.Offset, _cachedLength);
                }
                else
                {
                    FillWithResampledData(envelope.Offset, _cachedLength, _nextPitch);
                }

                _pitch = _nextPitch;
                envelope.ProcessSample(_audioData);

                _needsDataUpdate = false;
            }