sd + skpeaker
Dependencies: ST_I2S X_NUCLEO_COMMON
Fork of X_NUCLEO_CCA01M1 by
Diff: Components/Interfaces/SoundTerminal.h
- Revision:
- 3:c688a4acb4bf
- Parent:
- 0:542c79e7e0ef
--- a/Components/Interfaces/SoundTerminal.h Mon Apr 10 13:14:40 2017 +0000 +++ b/Components/Interfaces/SoundTerminal.h Fri Apr 21 10:07:28 2017 +0200 @@ -57,14 +57,14 @@ /* Includes ------------------------------------------------------------------*/ -#include "ComponentObject.h" +#include "Component.h" /* Classes ------------------------------------------------------------------*/ /** An abstract class for SoundTerminal components. */ -class SoundTerminal : public ComponentObject +class SoundTerminal : public Component { public: /* ACTION 1 --------------------------------------------------------------* @@ -78,10 +78,30 @@ * Example: * * virtual int GetValue(float *f) = 0; * *------------------------------------------------------------------------*/ - virtual int32_t Play(int16_t *pData, uint16_t Size, bool loop) = 0; - virtual int32_t Stop(void) = 0; - virtual int32_t SetVolume(uint8_t channel, uint8_t value) = 0; - virtual int32_t SetFrequency(uint32_t audio_freq) = 0; + /** + * @brief Playing a buffer of data. + */ + virtual int32_t play(int16_t *pData, uint16_t Size, bool loop) = 0; + + /** + * @brief Stop playing. + */ + virtual int32_t stop(void) = 0; + + /** + * @brief Setting volume. + */ + virtual int32_t set_volume(uint8_t channel, uint8_t value) = 0; + + /** + * @brief Setting frequency. + */ + virtual int32_t set_frequency(uint32_t audio_freq) = 0; + + /** + * @brief Destructor. + */ + virtual ~SoundTerminal() {}; }; #endif /* __SOUND_TERMINAL_CLASS_H */