CSL  6.0
CSL_ServerComponent.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This is an automatically generated file created by the Jucer!
5 
6  Creation date: 11 Oct 2009 11:20:11 pm
7 
8  Be careful when adding custom code to these files, as only the code within
9  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
10  and re-saved.
11 
12  Jucer version: 1.12
13 
14  ------------------------------------------------------------------------------
15 
16  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
17  Copyright 2004-6 by Raw Material Software ltd.
18 
19  ==============================================================================
20 */
21 
22 #ifndef __JUCER_HEADER_CSLSERVERCOMPONENT_CSLSERVERCOMPONENT_EB9904E6__
23 #define __JUCER_HEADER_CSLSERVERCOMPONENT_CSLSERVERCOMPONENT_EB9904E6__
24 
25 //[Headers] -- You can add your own extra header files here --
26 
27 #include "CSL_Includes.h" // CSL core
28 #include <AdditiveInstrument.h>
29 #include <BasicFMInstrument.h>
30 #include "SndFileInstrument.h"
31 #include "OSC_support.h"
32 
33 #include "juce.h" // JUCE core
34 #include "src/juce_appframework/audio/devices/juce_AudioDeviceManager.h"
35 
36 //[/Headers]
37 
38 
39 
40 //==============================================================================
41 /**
42  //[Comments]
43  An auto-generated component, created by the Jucer.
44 
45  Describe your class and how it works here!
46  //[/Comments]
47 */
48 class CSLServerComponent : public Component,
49  public Timer,
50  public AudioIODeviceCallback,
51  public ButtonListener,
52  public SliderListener
53 {
54 public:
55  //==============================================================================
58 
59  //==============================================================================
60  //[UserMethods] -- You can add your own custom methods in this section.
61 
62  void audioDeviceIOCallback (const float** inputChannelData,
63  int totalNumInputChannels,
64  float** outputChannelData,
65  int totalNumOutputChannels,
66  int numSamples);
67  void audioDeviceAboutToStart (AudioIODevice* device);
68  void audioDeviceStopped();
69  void timerCallback();
70  void recordOnOff();
71 
72  //[/UserMethods]
73 
74  void paint (Graphics& g);
75  void resized();
76  void buttonClicked (Button* buttonThatWasClicked);
77  void sliderValueChanged (Slider* sliderThatWasMoved);
78 
79  // Binary resources:
80  static const char* create_logo_sm_gif;
81  static const int create_logo_sm_gifSize;
82 
83  //==============================================================================
84  juce_UseDebuggingNewOperator
85 
86 private:
87  //[UserVariables] -- You can add your own custom variables in this section.
88 
89  AudioDeviceManager mAudioDeviceManager; // JUCE audio
90  csl::Buffer outBuffer; // main CSL buffer
91  bool recrding, playing; // state flags
92  float amplValue; // amp scale
93 
94  //[/UserVariables]
95 
96  //==============================================================================
97  TextButton* playButton;
98  TextButton* stopButton;
99  Label* label;
100  TextButton* prefsButton;
101  ToggleButton* RecordButton;
102  TextButton* quitButton;
103  Label* cpuLabel;
104  Slider* amplSlider;
106 
107  //==============================================================================
108  // (prevent copy constructor and operator= being generated..)
111 };
112 
113 
114 #endif // __JUCER_HEADER_CSLSERVERCOMPONENT_CSLSERVERCOMPONENT_EB9904E6__
void buttonClicked(Button *buttonThatWasClicked)
void audioDeviceIOCallback(const float **inputChannelData, int totalNumInputChannels, float **outputChannelData, int totalNumOutputChannels, int numSamples)
void paint(Graphics &g)
const CSLServerComponent & operator=(const CSLServerComponent &)
static const char * create_logo_sm_gif
void sliderValueChanged(Slider *sliderThatWasMoved)
static const int create_logo_sm_gifSize
ToggleButton * RecordButton
void audioDeviceAboutToStart(AudioIODevice *device)
Buffer – the multi-channel sample buffer class (passed around between generators and IO guys)...
Definition: CSL_Core.h:106
AudioDeviceManager mAudioDeviceManager