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.
BufferedWave.h
00001 #ifndef BUFFERED_WAVE_H_ 00002 #define BUFFERED_WAVE_H_ 00003 00004 #include "snd_wave_generator/Wave.h" 00005 #include "snd_wave_generator/WaveBuffer.h" 00006 00007 namespace snd_wave_generator { 00008 00009 /** 00010 * @brief A base class for Waves which pre-computes their values in a buffer during preparation and play from that buffer. 00011 */ 00012 class BufferedWave : public Wave { 00013 public: 00014 BufferedWave() : buffer() { } 00015 virtual float read(std::size_t pos) const { return this->buffer.read(pos); } 00016 00017 protected: 00018 WaveBuffer buffer; 00019 }; 00020 00021 } // snd_wave_generator 00022 00023 #endif // BUFFERED_WAVE_H_
Generated on Wed Jul 13 2022 16:23:43 by
1.7.2