CSL 5.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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 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 (AudioIODevice*) { };
37 void audioDeviceStopped() { };
38
39 protected:
40 AudioDeviceManager audioDeviceManager; ///< JUCE AudioDeviceManager
41
42 };
43
44 } // end of namespace
45
46 #endif CSL_JACKIO_H