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.

74 lines
2.6KB

  1. /*
  2. ==============================================================================
  3. This file was auto-generated!
  4. ==============================================================================
  5. */
  6. %%include_corresponding_header%%
  7. //==============================================================================
  8. %%content_component_class%%::%%content_component_class%%()
  9. {
  10. // Make sure you set the size of the component after
  11. // you add any child components.
  12. setSize (800, 600);
  13. // specify the number of input and output channels that we want to open
  14. setAudioChannels (2, 2);
  15. }
  16. %%content_component_class%%::~%%content_component_class%%()
  17. {
  18. // This shuts down the audio device and clears the audio source.
  19. shutdownAudio();
  20. }
  21. //==============================================================================
  22. void %%content_component_class%%::prepareToPlay (int samplesPerBlockExpected, double sampleRate)
  23. {
  24. // This function will be called when the audio device is started, or when
  25. // its settings (i.e. sample rate, block size, etc) are changed.
  26. // You can use this function to initialise any resources you might need,
  27. // but be careful - it will be called on the audio thread, not the GUI thread.
  28. // For more details, see the help for AudioProcessor::prepareToPlay()
  29. }
  30. void %%content_component_class%%::getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill)
  31. {
  32. // Your audio-processing code goes here!
  33. // For more details, see the help for AudioProcessor::getNextAudioBlock()
  34. // Right now we are not producing any data, in which case we need to clear the buffer
  35. // (to prevent the output of random noise)
  36. bufferToFill.clearActiveBufferRegion();
  37. }
  38. void %%content_component_class%%::releaseResources()
  39. {
  40. // This will be called when the audio device stops, or when it is being
  41. // restarted due to a setting change.
  42. // For more details, see the help for AudioProcessor::releaseResources()
  43. }
  44. //==============================================================================
  45. void %%content_component_class%%::paint (Graphics& g)
  46. {
  47. // (Our component is opaque, so we must completely fill the background with a solid colour)
  48. g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));
  49. // You can add your drawing code here!
  50. }
  51. void %%content_component_class%%::resized()
  52. {
  53. // This is called when the MainContentComponent is resized.
  54. // If you add any child components, this is where you should
  55. // update their positions.
  56. }