Newer
Older
music / app / src / main / cpp / waveforms / Waveform.h
@lukas lukas on 26 Aug 2022 450 bytes add noise effect
  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. SQUARE = 2,
  10. TRIANGLE = 3,
  11. };
  12.  
  13. #include "../effects/Processable.h"
  14. #include "../AudioHost.h"
  15.  
  16. class Waveform : public Processable {
  17. public:
  18. AudioHost *host;
  19.  
  20. void doRender(uint32_t sampleCount);
  21.  
  22. virtual void renderWaveform(uint32_t sampleCount) = 0;
  23.  
  24. virtual void setFrequency(float freq) = 0;
  25. };
  26.  
  27.  
  28. #endif