mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-04 03:40:07 +00:00
99 lines
3.3 KiB
C++
99 lines
3.3 KiB
C++
/*
|
|
==============================================================================
|
|
|
|
This is an automatically generated GUI class created by the Introjucer!
|
|
|
|
Be careful when adding custom code to these files, as only the code within
|
|
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
|
|
and re-saved.
|
|
|
|
Created with Introjucer version: 3.1.0
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions"
|
|
Copyright 2004-13 by Raw Material Software Ltd.
|
|
|
|
==============================================================================
|
|
*/
|
|
|
|
#ifndef __JUCE_HEADER_6B066C3EF65F4A5E__
|
|
#define __JUCE_HEADER_6B066C3EF65F4A5E__
|
|
|
|
//[Headers] -- You can add your own extra header files here --
|
|
#include "../jucedemo_headers.h"
|
|
|
|
|
|
//==============================================================================
|
|
/* This component scrolls a continuous waveform showing the audio that's currently
|
|
coming into the audio input.
|
|
*/
|
|
class LiveAudioInputDisplayComp : public Component,
|
|
public AudioIODeviceCallback,
|
|
public Timer
|
|
{
|
|
public:
|
|
//==============================================================================
|
|
LiveAudioInputDisplayComp();
|
|
~LiveAudioInputDisplayComp();
|
|
|
|
void paint (Graphics& g);
|
|
void timerCallback();
|
|
|
|
void audioDeviceAboutToStart (AudioIODevice* device);
|
|
void audioDeviceStopped();
|
|
void audioDeviceIOCallback (const float** inputChannelData, int numInputChannels,
|
|
float** outputChannelData, int numOutputChannels, int numSamples);
|
|
private:
|
|
float samples [1024];
|
|
int nextSample, subSample;
|
|
float accumulator;
|
|
|
|
LiveAudioInputDisplayComp (const LiveAudioInputDisplayComp&);
|
|
LiveAudioInputDisplayComp& operator= (const LiveAudioInputDisplayComp&);
|
|
};
|
|
|
|
//[/Headers]
|
|
|
|
|
|
|
|
//==============================================================================
|
|
/**
|
|
//[Comments]
|
|
This component creates the set of tabs that hold the various
|
|
audio demo pages..
|
|
//[/Comments]
|
|
*/
|
|
class AudioDemoTabComponent : public Component
|
|
{
|
|
public:
|
|
//==============================================================================
|
|
AudioDemoTabComponent ();
|
|
~AudioDemoTabComponent();
|
|
|
|
//==============================================================================
|
|
//[UserMethods] -- You can add your own custom methods in this section.
|
|
//[/UserMethods]
|
|
|
|
void paint (Graphics& g);
|
|
void resized();
|
|
|
|
|
|
|
|
private:
|
|
//[UserVariables] -- You can add your own custom variables in this section.
|
|
AudioDeviceManager deviceManager;
|
|
//[/UserVariables]
|
|
|
|
//==============================================================================
|
|
ScopedPointer<TabbedComponent> tabbedComponent;
|
|
|
|
|
|
//==============================================================================
|
|
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioDemoTabComponent)
|
|
};
|
|
|
|
//[EndFile] You can add extra defines here...
|
|
//[/EndFile]
|
|
|
|
#endif // __JUCE_HEADER_6B066C3EF65F4A5E__
|