#ifndef _Spectrum_extensions_h_
#define _Spectrum_extensions_h_
/* David Weenink 20010114 */

#ifndef _Spectrum_h_
	#include "Spectrum.h"
#endif
#ifndef _Sound_h_
	#include "Sound.h"
#endif
#ifndef _Graphics_h_
	#include "Graphics.h"
#endif

Matrix Spectrum_unwrap (Spectrum me);
/*
	Unwrap the phases of the spectrum according to an algorithm by
	Tribolet as published in:
	
	Tribolet, J.M. & Quatieri, T.F. (1979), Computation of the Complex
		Spectrum, in: Programs for Digital Signal Processing, 
		Digital Signal Processing Commitee (eds), IEEE Press,
		chapter 7.1.
		
	First row of returned matrix contains the amplitudes-squared,
	second row contains the unwrapped phases.
*/

void Spectrum_drawPhases (Spectrum me, Graphics g, double fmin, double fmax,
	double phase_min, double phase_max, int unwrap, int garnish);

#endif /* _Spectrum_extensions_h_ */
