00001
00002
00003
00004
00005
00006 #ifndef CSL_JUCEIO_H
00007 #define CSL_JUCEIO_H
00008
00009 #include "CSL_Core.h"
00010 #include "juce.h"
00011
00012 namespace csl {
00013
00017
00018 class JUCEIO : public IO, public AudioIODeviceCallback {
00019 public:
00021 JUCEIO(unsigned s_rate = CSL_mFrameRate, unsigned b_size = CSL_mBlockSize,
00022 int in_device = 0, int out_device = 0,
00023 unsigned in_chans = 0, unsigned out_chans = 2);
00024 virtual ~JUCEIO();
00025
00026 void open() throw(CException);
00027 void close() throw(CException);
00028 void start() throw(CException);
00029 void stop() throw(CException);
00030
00032 void audioDeviceIOCallback (const float** inputChannelData, int totalNumInputChannels,
00033 float** outputChannelData, int totalNumOutputChannels,
00034 int numSamples);
00036 void audioDeviceAboutToStart (AudioIODevice*) { };
00037 void audioDeviceStopped() { };
00038
00039 protected:
00040 AudioDeviceManager audioDeviceManager;
00041
00042 };
00043
00044 }
00045
00046 #endif CSL_JACKIO_H