AFSingleTone(3) AFSingleTone(3) NAME AFSingleTone - generate a tone SYNTAX #include <AF/AFUtils.h> extern double AFSingleTone(double freq, double peak, double phase, float *buffer, int length); DESCRIPTION AFSingleTone is a flexible subroutine for generating and combining sinewave signals. The generated signal is ADDED into the output buffer, so the client of this procedure has the responsibility for initially zeroing the buffer. Multiple tones can be generated by repeated calls. ARGUMENTS freq is the desired digital frequency, expressed as a fraction of the sam- pling rate. The value should be in the range 0.0 to 0.5. peak is the peak value of the sine wave desired. phase is the initial phase desired. This should be in the range [0.0..1024.0). It is used as an initial index into the sine wave table AF_sine_float(3). The return value from AFSingleTone is the final phase. If the return value is passed to a second invocation of AFSingleTone, the resulting wave will be continuous at the boundary. buffer is a pointer to the signal buffer that will be filled in by AFTonePair. length is the length of the block desired. SEE ALSO AF_sine_float(3), AFTonePair(3), AFDialPhone(3) AF(1) BUGS If you encounter a reproducible bug, please submit a problem report to (af-bugs@crl.dec.com). COPYRIGHT Copyright 1990-1994, Digital Equipment Corporation. See AF(1) for a full statement of rights and permissions. AUTHORS Larry Stewart, Digital Cambridge Research Lab