Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TriangleWave.h
00001 #ifndef TRIANGLE_WAVE_H_ 00002 #define TRIANGLE_WAVE_H_ 00003 00004 #include "snd_wave_generator/BufferedWave.h" 00005 00006 namespace snd_wave_generator { 00007 00008 /** 00009 * @brief A class producing a triangle wave of a given frequency. 00010 */ 00011 class TriangleWave : public BufferedWave { 00012 public: 00013 TriangleWave(unsigned freq) : BufferedWave(), frequency(freq) { } 00014 00015 virtual void prepare(std::size_t sampleRate); 00016 00017 private: 00018 unsigned frequency; 00019 }; 00020 00021 } // snd_wave_generator 00022 00023 #endif // TRIANGLE_WAVE_H_
Generated on Wed Jul 13 2022 16:23:43 by
1.7.2