CSL  6.0
JUCEIO.h
Go to the documentation of this file.
1 //
2 // JUCEIO.h -- Driver IO object for CSL on JUCE
3 // See the copyright notice and acknowledgment of authors in the file COPYRIGHT
4 //
5 
6 #ifndef CSL_JUCEIO_H
7 #define CSL_JUCEIO_H
8 
9 #include "CSL_Core.h"
10 //#include <juce.h>
11 
12 namespace csl {
13 
14 ///
15 /// JUCEIO is an IO that runs as a JUCE
16 ///
17 
18 class JUCEIO : public IO, public juce::AudioIODeviceCallback {
19 public:
20  ///< Constructor (stereo by default)
21  JUCEIO(unsigned s_rate = CSL_mFrameRate, unsigned b_size = CSL_mBlockSize,
22  int in_device = 0, int out_device = 0,
23  unsigned in_chans = 0, unsigned out_chans = 2);
24  virtual ~JUCEIO();
25 
26  void open() throw(CException); ///< open/close start/stop methods
27  void close() throw(CException);
28  void start() throw(CException); ///< start my timer thread
29  void stop() throw(CException); ///< stop the timer thread
30 
31  ///< Audio playback callback & utilities
32  void audioDeviceIOCallback (const float** inputChannelData, int totalNumInputChannels,
33  float** outputChannelData, int totalNumOutputChannels,
34  int numSamples);
35  /// JUCE methods
36  void audioDeviceAboutToStart (juce::AudioIODevice*) { };
37  void audioDeviceStopped() { };
38 
39 protected:
40  juce::AudioDeviceManager audioDeviceManager; ///< JUCE AudioDeviceManager
41 
42 };
43 
44 } // end of namespace
45 
46 #endif // CSL_JACKIO_H
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
Definition: Accessor.h:17
void start()
start my timer thread
Definition: JUCEIO.cpp:52
JUCEIO(unsigned s_rate=CSL_mFrameRate, unsigned b_size=CSL_mBlockSize, int in_device=0, int out_device=0, unsigned in_chans=0, unsigned out_chans=2)
< Constructor (stereo by default)
Definition: JUCEIO.cpp:12
JUCEIO is an IO that runs as a JUCE.
Definition: JUCEIO.h:18
void close()
open/close start/stop methods
Definition: JUCEIO.cpp:48
#define CSL_mFrameRate
default sample rate (tested up to 96000)
Definition: CSL_Types.h:91
juce::AudioDeviceManager audioDeviceManager
JUCE AudioDeviceManager.
Definition: JUCEIO.h:37
void audioDeviceIOCallback(const float **inputChannelData, int totalNumInputChannels, float **outputChannelData, int totalNumOutputChannels, int numSamples)
Definition: JUCEIO.cpp:63
void audioDeviceAboutToStart(juce::AudioIODevice *)
JUCE methods.
Definition: JUCEIO.h:36
void audioDeviceStopped()
Definition: JUCEIO.h:37
IO – the abstract I/O scheduling class; subclasses interface to specific I/O APIs.
Definition: CSL_Core.h:752
virtual ~JUCEIO()
open/close start/stop methods
Definition: JUCEIO.cpp:38
void open()
open/close start/stop methods
Definition: JUCEIO.cpp:44
void stop()
stop the timer thread
Definition: JUCEIO.cpp:57
#define CSL_mBlockSize
normal hosts
Definition: CSL_Types.h:99
Base class of CSL exceptions (written upper-case). Has a string message.