You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
590B

  1. #ifndef synth_tonesweep_h_
  2. #define synth_tonesweep_h_
  3. #include "AudioStream.h"
  4. // A u d i o T o n e S w e e p
  5. // Written by Pete (El Supremo) Feb 2014
  6. class AudioToneSweep : public AudioStream
  7. {
  8. public:
  9. AudioToneSweep(void) :
  10. AudioStream(0,NULL), sweep_busy(0)
  11. { }
  12. boolean begin(short t_amp,int t_lo,int t_hi,float t_time);
  13. virtual void update(void);
  14. unsigned char busy(void);
  15. private:
  16. short tone_amp;
  17. int tone_lo;
  18. int tone_hi;
  19. uint64_t tone_freq;
  20. uint64_t tone_phase;
  21. uint64_t tone_incr;
  22. int tone_sign;
  23. unsigned char sweep_busy;
  24. };
  25. #endif