VstEffect.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * VstEffect.h - class for handling VST effect plugins
  3. *
  4. * Copyright (c) 2006-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
  5. *
  6. * This file is part of LMMS - https://lmms.io
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public
  10. * License as published by the Free Software Foundation; either
  11. * version 2 of the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. * General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public
  19. * License along with this program (see COPYING); if not, write to the
  20. * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21. * Boston, MA 02110-1301 USA.
  22. *
  23. */
  24. #ifndef _VST_EFFECT_H
  25. #define _VST_EFFECT_H
  26. #include <QtCore/QMutex>
  27. #include <QtCore/QSharedPointer>
  28. #include "Effect.h"
  29. #include "VstEffectControlDialog.h"
  30. #include "VstEffectControls.h"
  31. class VstPlugin;
  32. class VstEffect : public Effect
  33. {
  34. public:
  35. VstEffect( Model * _parent,
  36. const Descriptor::SubPluginFeatures::Key * _key );
  37. virtual ~VstEffect();
  38. virtual bool processAudioBuffer( sampleFrame * _buf,
  39. const fpp_t _frames );
  40. virtual EffectControls * controls()
  41. {
  42. return &m_vstControls;
  43. }
  44. virtual inline QString publicName() const
  45. {
  46. return m_plugin->name();
  47. }
  48. private:
  49. void openPlugin( const QString & _plugin );
  50. void closePlugin();
  51. QSharedPointer<VstPlugin> m_plugin;
  52. QMutex m_pluginMutex;
  53. EffectKey m_key;
  54. VstEffectControls m_vstControls;
  55. friend class VstEffectControls;
  56. friend class VstEffectControlDialog;
  57. friend class manageVSTEffectView;
  58. } ;
  59. #endif