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.

35 lines
761B

  1. /*
  2. ZynAddSubFX - a software synthesizer
  3. VuMeter.h - VU Meter
  4. Copyright (C) 2016 Mark McCurry
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 2
  8. of the License, or (at your option) any later version.
  9. */
  10. #ifndef VU_METER_H
  11. #define VU_METER_H
  12. #include <FL/Fl_Box.H>
  13. class VuMeter: public Fl_Box
  14. {
  15. public:
  16. VuMeter(int x,int y, int w, int h, const char *label=0)
  17. :Fl_Box(x,y,w,h,label)
  18. {}
  19. protected:
  20. float limit(float x)
  21. {
  22. if(x<0.0)
  23. x=0.0;
  24. else if(x>1.0)
  25. x=1.0;
  26. return x;
  27. }
  28. };
  29. #endif