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.

77 lines
3.1KB

  1. /*
  2. ==============================================================================
  3. This file was auto-generated by the Jucer!
  4. It contains the basic startup code for a Juce application.
  5. ==============================================================================
  6. */
  7. #ifndef __PLUGINPROCESSOR_H_526ED7A9__
  8. #define __PLUGINPROCESSOR_H_526ED7A9__
  9. #include "JuceHeader.h"
  10. #include "FilterGraph.h"
  11. //==============================================================================
  12. /**
  13. As the name suggest, this class does the actual audio processing.
  14. */
  15. class JuceDemoHostAudioProcessor : public AudioProcessor
  16. {
  17. public:
  18. //==============================================================================
  19. JuceDemoHostAudioProcessor();
  20. ~JuceDemoHostAudioProcessor();
  21. //==============================================================================
  22. void prepareToPlay (double sampleRate, int samplesPerBlock) override;
  23. void releaseResources() override;
  24. void processBlock (AudioSampleBuffer& buffer, MidiBuffer& midiMessages) override;
  25. //==============================================================================
  26. bool hasEditor() const override { return true; }
  27. AudioProcessorEditor* createEditor() override;
  28. //==============================================================================
  29. const String getName() const override { return JucePlugin_Name; }
  30. const String getInputChannelName (int channelIndex) const override;
  31. const String getOutputChannelName (int channelIndex) const override;
  32. bool isInputChannelStereoPair (int index) const override;
  33. bool isOutputChannelStereoPair (int index) const override;
  34. bool acceptsMidi() const override;
  35. bool producesMidi() const override;
  36. bool silenceInProducesSilenceOut() const override;
  37. double getTailLengthSeconds() const override;
  38. //==============================================================================
  39. int getNumPrograms() override { return 0; }
  40. int getCurrentProgram() override { return 0; }
  41. void setCurrentProgram (int /*index*/) override {}
  42. const String getProgramName (int /*index*/) override { return ""; }
  43. void changeProgramName (int /*index*/, const String& /*newName*/) override {}
  44. //==============================================================================
  45. void getStateInformation (MemoryBlock& destData) override;
  46. void setStateInformation (const void* data, int sizeInBytes) override;
  47. private:
  48. //==============================================================================
  49. ScopedPointer<ApplicationProperties> appProperties;
  50. AudioPluginFormatManager formatManager;
  51. FilterGraph graph;
  52. MidiKeyboardState* midiKeyState;
  53. CriticalSection midiKeyMutex;
  54. friend class JuceDemoHostAudioProcessorEditor;
  55. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (JuceDemoHostAudioProcessor)
  56. };
  57. #endif // __PLUGINPROCESSOR_H_526ED7A9__