13 int in_device,
int out_device,
14 unsigned in_chans,
unsigned out_chans)
15 :
IO(s_rate, b_size, in_device, out_device, in_chans, out_chans) {
24 if (errorMsg.isNotEmpty()) {
25 printf(
"JUCEIO error: %s\n", (
char *) errorMsg.toRawUTF8());
33 printf(
"Audio IO rate %g; block size %d\n", dev->getCurrentSampleRate(),
34 dev->getDefaultBufferSize());
64 float** outData,
int numOuts,
69 memset(outData[i], 0, (numSamples *
sizeof(
sample)));
88 for (
unsigned i = 0; i < numOuts; i++)
sample * SampleBuffer
1-channel buffer data type, vector of (sample)
void logMsg(const char *format,...)
These are the public logging messages.
unsigned mNumFrames
num frames used in each buffer
virtual void setBuffer(unsigned bufNum, SampleBuffer sPtr)
AdditiveInstrument.h – Sum-of-sines synthesis instrument class.
void pullInput(Buffer &outBuffer, SampleBuffer out=0)
get a buffer from the CSL graph
void start()
start my timer thread
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)
void close()
open/close start/stop methods
juce::AudioDeviceManager audioDeviceManager
JUCE AudioDeviceManager.
void audioDeviceIOCallback(const float **inputChannelData, int totalNumInputChannels, float **outputChannelData, int totalNumOutputChannels, int numSamples)
UnitGenerator * mGraph
the root of my client DSP graph, often a mixer or panner
float sample
(could be changed to int, or double)
IO – the abstract I/O scheduling class; subclasses interface to specific I/O APIs.
unsigned mNumFramesPlayed
counter of frames I've played
virtual ~JUCEIO()
open/close start/stop methods
unsigned mNumOutChannels
outputs
IO_Status mStatus
status flag
void open()
open/close start/stop methods
Buffer mOutputBuffer
the output buffer I use (passed to nextBuffer calls)
Buffer mInputBuffer
the most recent input buffer (if it's turned on)
unsigned mNumInChannels
inputs
void stop()
stop the timer thread
Base class of CSL exceptions (written upper-case). Has a string message.