mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Added AudioComponentTemplate
This commit is contained in:
parent
ff6520a89a
commit
06b9bdefb6
17 changed files with 392 additions and 110 deletions
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file was auto-generated!
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef MAINCOMPONENT_H_INCLUDED
|
||||
#define MAINCOMPONENT_H_INCLUDED
|
||||
|
||||
INCLUDE_JUCE
|
||||
|
||||
//==============================================================================
|
||||
/*
|
||||
This component lives inside our window, and this is where you should put all
|
||||
your controls and content.
|
||||
*/
|
||||
class MainContentComponent : public AudioAppComponent
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
|
||||
|
||||
MainContentComponent()
|
||||
{
|
||||
setSize (500, 400);
|
||||
// the the input and output channels (currently Mono in and out)
|
||||
setAudioChannels (1, 1);
|
||||
}
|
||||
|
||||
~MainContentComponent()
|
||||
{
|
||||
}
|
||||
|
||||
void prepareToPlay (int samplesPerBlockExpected, double sampleRate)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void releaseResources()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void getNextAudioBlock (const AudioSourceChannelInfo& bufferToFill)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void paint (Graphics& g)
|
||||
{
|
||||
// fill background
|
||||
g.fillAll (Colours::black);
|
||||
|
||||
}
|
||||
|
||||
void resized()
|
||||
{
|
||||
// This is called when the MainContentComponent is resized.
|
||||
// If you add any child components, this is where you should
|
||||
// update their positions.
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
//==============================================================================
|
||||
|
||||
// private member variables
|
||||
|
||||
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
|
||||
};
|
||||
|
||||
|
||||
Component* createMainContentComponent() { return new MainContentComponent(); };
|
||||
|
||||
#endif // MAINCOMPONENT_H_INCLUDED
|
||||
Loading…
Add table
Add a link
Reference in a new issue