Newer
Older
music / app / src / main / cpp / waveforms / Waveform.h
  1. #ifndef MUSIC_WAVEFORM_H
  2. #define MUSIC_WAVEFORM_H
  3.  
  4. class Waveform;
  5.  
  6. enum WaveformType {
  7. SINE = 0,
  8. SAWTOOTH = 1,
  9. };
  10.  
  11. #include "../effects/Processable.h"
  12. #include "../AudioHost.h"
  13.  
  14. class Waveform : public Processable {
  15. public:
  16. float amplitude = 0.0f;
  17. AudioHost *host;
  18.  
  19. void doRender(uint32_t sampleCount);
  20.  
  21. virtual void renderWaveform(uint32_t sampleCount) = 0;
  22.  
  23. virtual void setFrequency(float freq) = 0;
  24. };
  25.  
  26.  
  27. #endif