Analyzer.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* Analyzer.h - declaration of Analyzer class.
  2. *
  3. * Copyright (c) 2019 Martin Pavelek <he29/dot/HS/at/gmail/dot/com>
  4. *
  5. * Based partially on Eq plugin code,
  6. * Copyright (c) 2014-2017, David French <dave/dot/french3/at/googlemail/dot/com>
  7. *
  8. * This file is part of LMMS - https://lmms.io
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2 of the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public
  21. * License along with this program (see COPYING); if not, write to the
  22. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  23. * Boston, MA 02110-1301 USA.
  24. *
  25. */
  26. #ifndef ANALYZER_H
  27. #define ANALYZER_H
  28. #include "Effect.h"
  29. #include "SaControls.h"
  30. #include "SaProcessor.h"
  31. //! Top level class; handles LMMS interface and feeds data to the data processor.
  32. class Analyzer : public Effect
  33. {
  34. public:
  35. Analyzer(Model *parent, const Descriptor::SubPluginFeatures::Key *key);
  36. virtual ~Analyzer() {};
  37. bool processAudioBuffer(sampleFrame *buffer, const fpp_t frame_count) override;
  38. EffectControls *controls() override {return &m_controls;}
  39. SaProcessor *getProcessor() {return &m_processor;}
  40. private:
  41. SaProcessor m_processor;
  42. SaControls m_controls;
  43. };
  44. #endif // ANALYZER_H