// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static final float	PI	= (float) java.lang.Math.PI;
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float atan2(float y, float x);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float cos(float angle);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float princarg(float phase);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float sin(float angle);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float sqrt(float value);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/Disposable.java
// public interface Disposable
// {
// 	void dispose();
// }


import static de.jurihock.voicesmith.dsp.Math.PI;
import static de.jurihock.voicesmith.dsp.Math.atan2;
import static de.jurihock.voicesmith.dsp.Math.cos;
import static de.jurihock.voicesmith.dsp.Math.princarg;
import static de.jurihock.voicesmith.dsp.Math.sin;
import static de.jurihock.voicesmith.dsp.Math.sqrt;
import de.jurihock.voicesmith.Disposable;
		omegaS = new float[fftSize];
		prevPhaseA = new float[fftSize];
		prevPhaseS = new float[fftSize];

		for (int i = 0; i < fftSize; i++)
		{
			omegaA[i] = 2 * PI * (i / (float) frameSize) // not fftSize!
				* (float) analysisHopSize;

			omegaS[i] = 2 * PI * (i / (float) frameSize) // not fftSize!
				* (float) synthesisHopSize;
		}
	}

	public void processFrame(float[] frame)
	{
		if (timescaleRatio == 1)
			return;

		float re, im, abs;
		float nextPhaseA, nextPhaseS;
		float phaseDeltaA, phaseDeltaS;

		for (int i = 1; i < fftSize; i++)
		{
			// Get source Re and Im parts
			re = frame[2 * i];
			im = frame[2 * i + 1];

			// Compute source phase
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static final float	PI	= (float) java.lang.Math.PI;
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float atan2(float y, float x);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float cos(float angle);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float princarg(float phase);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float sin(float angle);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/dsp/Math.java
// public static native float sqrt(float value);
// 
// Path: voicesmith/src/de/jurihock/voicesmith/Disposable.java
// public interface Disposable
// {
// 	void dispose();
// }


// Path: voicesmith/src/de/jurihock/voicesmith/dsp/processors/TimescaleProcessor.java
import static de.jurihock.voicesmith.dsp.Math.PI;
import static de.jurihock.voicesmith.dsp.Math.atan2;
import static de.jurihock.voicesmith.dsp.Math.cos;
import static de.jurihock.voicesmith.dsp.Math.princarg;
import static de.jurihock.voicesmith.dsp.Math.sin;
import static de.jurihock.voicesmith.dsp.Math.sqrt;
import de.jurihock.voicesmith.Disposable;

		omegaS = new float[fftSize];
		prevPhaseA = new float[fftSize];
		prevPhaseS = new float[fftSize];

		for (int i = 0; i < fftSize; i++)
		{
			omegaA[i] = 2 * PI * (i / (float) frameSize) // not fftSize!
				* (float) analysisHopSize;

			omegaS[i] = 2 * PI * (i / (float) frameSize) // not fftSize!
				* (float) synthesisHopSize;
		}
	}

	public void processFrame(float[] frame)
	{
		if (timescaleRatio == 1)
			return;

		float re, im, abs;
		float nextPhaseA, nextPhaseS;
		float phaseDeltaA, phaseDeltaS;

		for (int i = 1; i < fftSize; i++)
		{
			// Get source Re and Im parts
			re = frame[2 * i];
			im = frame[2 * i + 1];

			// Compute source phase
			nextPhaseA = atan2(im, re);