Audio plugin host https://kx.studio/carla
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.

allpass.cpp 572B

11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839
  1. // Allpass filter implementation
  2. //
  3. // Written by Jezar at Dreampoint, June 2000
  4. // http://www.dreampoint.co.uk
  5. // This code is public domain
  6. #include "allpass.hpp"
  7. allpass::allpass()
  8. {
  9. feedback = 0.0f;
  10. bufidx = 0;
  11. buffer = nullptr;
  12. bufsize = 0;
  13. }
  14. void allpass::setbuffer(float *buf, int size)
  15. {
  16. buffer = buf;
  17. bufsize = size;
  18. }
  19. void allpass::mute()
  20. {
  21. for (int i=0; i<bufsize; i++)
  22. buffer[i]=0;
  23. }
  24. void allpass::setfeedback(float val)
  25. {
  26. feedback = val;
  27. }
  28. float allpass::getfeedback()
  29. {
  30. return feedback;
  31. }
  32. //ends