The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

96 lines
2.9KB

  1. /*
  2. ==============================================================================
  3. This file was auto-generated!
  4. ==============================================================================
  5. */
  6. #ifndef MAINCOMPONENT_H_INCLUDED
  7. #define MAINCOMPONENT_H_INCLUDED
  8. INCLUDE_JUCE
  9. //==============================================================================
  10. /*
  11. This component lives inside our window, and this is where you should put all
  12. your controls and content.
  13. */
  14. class MainContentComponent : public AudioAppComponent
  15. {
  16. public:
  17. //==============================================================================
  18. MainContentComponent()
  19. {
  20. setSize (500, 400);
  21. // specify the number of input and output channels needed
  22. setAudioChannels (1, 1);
  23. }
  24. ~MainContentComponent()
  25. {
  26. shutdownAudio();
  27. }
  28. //=======================================================================
  29. void prepareToPlay (int samplesPerBlockExpected, double sampleRate) override
  30. {
  31. // This function will be called when the audio device is started, or when
  32. // its settings (i.e. sample rate, block size, etc) are changed.
  33. // You can use this function to initialise any resources you might need,
  34. // but be careful - it will be called on the audio thread, not the GUI thread.
  35. // For more details, see the help for AudioProcessor::prepareToPlay()
  36. }
  37. void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill) override
  38. {
  39. // Your audio-processing code goes here!
  40. // For more details, see the help for AudioProcessor::getNextAudioBlock()
  41. }
  42. void releaseResources() override
  43. {
  44. // This will be called when the audio device stops, or when it is being
  45. // restarted due to a setting change.
  46. // For more details, see the help for AudioProcessor::releaseResources()
  47. }
  48. //=======================================================================
  49. void paint (Graphics& g) override
  50. {
  51. // (Our component is opaque, so we must completely fill the background with a solid colour)
  52. g.fillAll (Colours::black);
  53. // You can add your drawing code here!
  54. }
  55. void resized() override
  56. {
  57. // This is called when the MainContentComponent is resized.
  58. // If you add any child components, this is where you should
  59. // update their positions.
  60. }
  61. private:
  62. //==============================================================================
  63. // Your private member variables go here...
  64. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
  65. };
  66. // (This function is called by the app startup code to create our main component)
  67. Component* createMainContentComponent() { return new MainContentComponent(); }
  68. #endif // MAINCOMPONENT_H_INCLUDED