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.

100 lines
3.3KB

  1. /*
  2. ==============================================================================
  3. This is an automatically generated GUI class created by the Introjucer!
  4. Be careful when adding custom code to these files, as only the code within
  5. the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  6. and re-saved.
  7. Created with Introjucer version: 3.1.0
  8. ------------------------------------------------------------------------------
  9. The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
  10. Copyright 2004-13 by Raw Material Software Ltd.
  11. ==============================================================================
  12. */
  13. #ifndef __JUCE_HEADER_6B066C3EF65F4A5E__
  14. #define __JUCE_HEADER_6B066C3EF65F4A5E__
  15. //[Headers] -- You can add your own extra header files here --
  16. #include "../jucedemo_headers.h"
  17. //==============================================================================
  18. /* This component scrolls a continuous waveform showing the audio that's currently
  19. coming into the audio input.
  20. */
  21. class LiveAudioInputDisplayComp : public Component,
  22. public AudioIODeviceCallback,
  23. public Timer
  24. {
  25. public:
  26. //==============================================================================
  27. LiveAudioInputDisplayComp();
  28. ~LiveAudioInputDisplayComp();
  29. void paint (Graphics& g);
  30. void timerCallback();
  31. void audioDeviceAboutToStart (AudioIODevice* device);
  32. void audioDeviceStopped();
  33. void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
  34. float** outputChannelData, int numOutputChannels, int numSamples);
  35. private:
  36. float samples [1024];
  37. int nextSample, subSample;
  38. float accumulator;
  39. LiveAudioInputDisplayComp (const LiveAudioInputDisplayComp&);
  40. LiveAudioInputDisplayComp& operator= (const LiveAudioInputDisplayComp&);
  41. };
  42. //[/Headers]
  43. //==============================================================================
  44. /**
  45. //[Comments]
  46. This component creates the set of tabs that hold the various
  47. audio demo pages..
  48. //[/Comments]
  49. */
  50. class AudioDemoTabComponent : public Component
  51. {
  52. public:
  53. //==============================================================================
  54. AudioDemoTabComponent ();
  55. ~AudioDemoTabComponent();
  56. //==============================================================================
  57. //[UserMethods] -- You can add your own custom methods in this section.
  58. //[/UserMethods]
  59. void paint (Graphics& g);
  60. void resized();
  61. private:
  62. //[UserVariables] -- You can add your own custom variables in this section.
  63. AudioDeviceManager deviceManager;
  64. //[/UserVariables]
  65. //==============================================================================
  66. ScopedPointer<TabbedComponent> tabbedComponent;
  67. //==============================================================================
  68. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoTabComponent)
  69. };
  70. //[EndFile] You can add extra defines here...
  71. //[/EndFile]
  72. #endif // __JUCE_HEADER_6B066C3EF65F4A5E__