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.
Dependents: SoundWaveGeneratorTest SoundWaveGeneratorTest
Wave.h
00001 #ifndef WAVE_H_ 00002 #define WAVE_H_ 00003 00004 #include <cstddef> 00005 00006 namespace snd_wave_generator { 00007 00008 /** 00009 * @brief Interface of a playable sound wave. 00010 * Waves are processed in two phases. 00011 * Before sending out signal, the wave is "prepared" for the generator sample rate. 00012 * Once the preparation is done, the generator will repeatedly "read" the wave samples. 00013 * The sample position is measured in samples. 00014 */ 00015 class Wave { 00016 public: 00017 virtual void prepare(std::size_t sampleRate) = 0; 00018 virtual float read(std::size_t pos) const = 0; 00019 }; 00020 00021 } // snd_wave_generator 00022 00023 #endif // WAVE_H_
Generated on Wed Jul 13 2022 01:41:32 by
1.7.2