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.

40 lines
971B

  1. #ifndef effect_flange_h_
  2. #define effect_flange_h_
  3. #include "AudioStream.h"
  4. /******************************************************************/
  5. // A u d i o E f f e c t F l a n g e
  6. // Written by Pete (El Supremo) Jan 2014
  7. #define DELAY_PASSTHRU -1
  8. class AudioEffectFlange :
  9. public AudioStream
  10. {
  11. public:
  12. AudioEffectFlange(void):
  13. AudioStream(2,inputQueueArray) {
  14. }
  15. boolean begin(short *delayline,int d_length,int delay_offset,int d_depth,float delay_rate);
  16. boolean modify(int delay_offset,int d_depth,float delay_rate);
  17. virtual void update(void);
  18. void stop(void);
  19. private:
  20. audio_block_t *inputQueueArray[2];
  21. static short *l_delayline;
  22. static short *r_delayline;
  23. static int delay_length;
  24. static short l_circ_idx;
  25. static short r_circ_idx;
  26. static int delay_depth;
  27. static int delay_offset_idx;
  28. static int delay_rate_incr;
  29. static unsigned int l_delay_rate_index;
  30. static unsigned int r_delay_rate_index;
  31. };
  32. #endif