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.

105 lines
3.6KB

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