Olivier Smeesters
/
DtmfKit
A DTMF sequence editor and player for HAM radio equipment command & control.
Diff: SoundWaveGenerator/snd_wave_generator/TriangleWave.h
- Revision:
- 0:1324e7d9d471
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SoundWaveGenerator/snd_wave_generator/TriangleWave.h Mon Mar 07 22:51:19 2011 +0000 @@ -0,0 +1,23 @@ +#ifndef TRIANGLE_WAVE_H_ +#define TRIANGLE_WAVE_H_ + +#include "snd_wave_generator/BufferedWave.h" + +namespace snd_wave_generator { + +/** + * @brief A class producing a triangle wave of a given frequency. + */ +class TriangleWave : public BufferedWave { +public: + TriangleWave(unsigned freq) : BufferedWave(), frequency(freq) { } + + virtual void prepare(std::size_t sampleRate); + +private: + unsigned frequency; +}; + +} // snd_wave_generator + +#endif // TRIANGLE_WAVE_H_