public static int ResampledLength( int sourceLength, double resamplingFactor ) { return ( int )( sourceLength / resamplingFactor ); }
void SetPitch(double newPitch) { if (newPitch == _nextPitch) { return; } _nextPitch = newPitch; _needsDataUpdate = true; if (envelope == GATEnvelope.nullEnvelope) { _cachedLength = GATMaths.ResampledLength(sourceSample.Count, _nextPitch); _needsNewContainer = true; } }