#ifndef _TELEPHONE_H_
#define _TELEPHONE_H_

#define SAMPLERATE	16000	/* samples per second */
#define SAMPLEDEPTH	16	/* bits per sample */
#define SAMPLERANGE	((1LL<<SAMPLEDEPTH)-1)

#define MARKFREQ	1200.	/* logical 1 */
#define SPACEFREQ	2200.	/* logical 0 */
#define DATARATE	1200.	/* bits per second */
#define DATATIME	(1./DATARATE)	/* seconds per bit */

int writesample(FILE *stream, long sample);
int add_silence(FILE *stream, float length);
int add_dtmf(FILE *stream, float f1, float f2, float length);
float add_sine(FILE *stream, float freq, float length, float phase);

#endif
