#include <CSL_Core.h>

Public Member Functions | |
| IO (unsigned s_rate=44100, unsigned b_size=CGestalt::blockSize(), int in_device=-1, int out_device=-1, unsigned in_chans=0, unsigned out_chans=2) | |
| virtual | ~IO () |
| default is stereo output | |
| virtual void | open () throw (CException) |
| virtual void | close () throw (CException) |
| open/close start/stop methods | |
| virtual void | start () throw (CException) |
| virtual void | stop () throw (CException) |
| virtual void | test () throw (CException) |
| void | setRoot (UnitGenerator &root) |
| test the IO's graph | |
| void | clearRoot () |
| set/clear my graph root generator | |
| void | pullInput (Buffer &outBuffer, SampleBuffer out=0) throw (CException) |
| get a buffer from the CSL graph | |
| virtual Buffer & | getInput () throw (CException) |
| Get the current input from the sound card. | |
| virtual Buffer & | getInput (unsigned numFrames, unsigned numChannels) throw (CException) |
| unsigned | getAndIncrementSequence () |
| increment and answer my seq # | |
| void | printTimeStatistics (struct timeval *tthen, struct timeval *tnow, long *tsecond, long *ttimeSum, long *ttimeVals) |
Public Attributes | |
| UnitGenerator * | mGraph |
| the root of my client DSP graph, often a mixer or panner | |
| Buffer | mInputBuffer |
| the most recent input buffer (if it's turned on) | |
| Buffer | mOutputBuffer |
| the output buffer I use (passed to nextBuffer calls) | |
| SampleBuffer | mInputPointer |
| the buffer for holding the sound card input (if open) | |
| unsigned * | mChannelMap |
| the output channel remapping array | |
| unsigned | mNumFramesPlayed |
| counter of frames I've played | |
| unsigned | mSequence |
| sequence counter | |
| unsigned | mLoggingPeriod |
| logging period in seconds | |
| unsigned | mNumInChannels |
| # inputs | |
| unsigned | mNumOutChannels |
| # outputs | |
| unsigned | mNumRealInChannels |
| # physical inputs | |
| unsigned | mNumRealOutChannels |
| # physical outputs | |
| IO_Status | mStatus |
| status flag | |
| struct timeval mThen | mNow |
| used for getting the real time | |
| long | mTimeVals |
| long | mThisSec |
| long | mTimeSum |
Protected Member Functions | |
| virtual void | initialize (unsigned sr, unsigned bs, int is, int os, unsigned ic, unsigned oc) |
| initialize overridden in subclasses | |
All this is public because it's used by static call-back functions.
| IO::IO | ( | unsigned | s_rate = 44100, |
|
| unsigned | b_size = CGestalt::blockSize(), |
|||
| int | in_device = -1, |
|||
| int | out_device = -1, |
|||
| unsigned | in_chans = 0, |
|||
| unsigned | out_chans = 2 | |||
| ) |
References csl::logMsg().
| virtual csl::IO::~IO | ( | ) | [inline, virtual] |
default is stereo output
| virtual void csl::IO::open | ( | ) | throw (CException) [inline, virtual] |
Reimplemented in csl::AUIO, csl::CAIO, csl::FileIO, csl::JackIO, csl::JUCEIO, csl::PAIO, csl::RemoteIO, and csl::VSTIO.
References csl::kIOOpen.
Referenced by main().
| virtual void csl::IO::close | ( | ) | throw (CException) [inline, virtual] |
open/close start/stop methods
Reimplemented in csl::AUIO, csl::CAIO, csl::FileIO, csl::JackIO, csl::JUCEIO, csl::PAIO, csl::RemoteIO, and csl::VSTIO.
References csl::kIOClosed.
Referenced by main(), and csl::CSLService::stop().
| virtual void csl::IO::start | ( | void | ) | throw (CException) [inline, virtual] |
Reimplemented in csl::AUIO, csl::CAIO, csl::JackIO, csl::JUCEIO, csl::NullIO, csl::StdIO, csl::PAIO, csl::RemoteIO, and csl::VSTIO.
References csl::kIORunning.
Referenced by fm_bells(), main(), mixer(), phonemes(), csl::CSLService::resume(), and swept_noise().
| virtual void csl::IO::stop | ( | void | ) | throw (CException) [inline, virtual] |
Reimplemented in csl::AUIO, csl::CAIO, csl::FileIO, csl::JackIO, csl::JUCEIO, csl::NullIO, csl::StdIO, csl::PAIO, csl::RemoteIO, and csl::VSTIO.
References csl::kIOOpen.
Referenced by main(), csl::CSLService::stop(), and csl::CSLService::suspend().
| virtual void csl::IO::test | ( | ) | throw (CException) [inline, virtual] |
Reimplemented in csl::FileIO, and csl::PAIO.
| void IO::setRoot | ( | UnitGenerator & | root | ) |
test the IO's graph
References csl::UnitGenerator::addOutput(), and mGraph.
Referenced by dumpTest(), main(), make_instrument(), runTest(), testMultiTap(), testReverb(), and testStereoverb().
| void IO::clearRoot | ( | ) |
set/clear my graph root generator
References mGraph, and csl::UnitGenerator::removeOutput().
Referenced by dumpTest(), runTest(), testMultiTap(), testReverb(), and testStereoverb().
| void IO::pullInput | ( | Buffer & | outBuffer, | |
| SampleBuffer | out = 0 | |||
| ) | throw (CException) |
get a buffer from the CSL graph
References GET_TIME, csl::kLogError, csl::logMsg(), and csl::CException::mMessage.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::StdIO::FeederFunction(), csl::NullIO::FeederFunction(), JackCallback(), pa_callback(), and RenderCallback().
| Buffer & IO::getInput | ( | ) | throw (CException) [virtual] |
Get the current input from the sound card.
Reimplemented in csl::AUIO, csl::FileIO, and csl::NullIO.
References mInputBuffer, csl::Buffer::mNumChannels, and csl::Buffer::mNumFrames.
| Buffer & IO::getInput | ( | unsigned | numFrames, | |
| unsigned | numChannels | |||
| ) | throw (CException) [virtual] |
Reimplemented in csl::AUIO, csl::FileIO, and csl::NullIO.
References csl::Interleaver::deinterleave(), and mNumInChannels.
| unsigned IO::getAndIncrementSequence | ( | ) |
| void IO::printTimeStatistics | ( | struct timeval * | tthen, | |
| struct timeval * | tnow, | |||
| long * | tsecond, | |||
| long * | ttimeSum, | |||
| long * | ttimeVals | |||
| ) |
References csl::CGestalt::blockSize(), csl::CGestalt::frameRate(), csl::logMsg(), mLoggingPeriod, and SUB_TIMES.
Referenced by csl::FileIO::threadFunction().
| virtual void csl::IO::initialize | ( | unsigned | sr, | |
| unsigned | bs, | |||
| int | is, | |||
| int | os, | |||
| unsigned | ic, | |||
| unsigned | oc | |||
| ) | [inline, protected, virtual] |
the root of my client DSP graph, often a mixer or panner
Referenced by csl::JUCEIO::audioDeviceIOCallback(), clearRoot(), pa_callback(), setRoot(), csl::PAIO::test(), and csl::FileIO::writeNextBuffer().
the most recent input buffer (if it's turned on)
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::close(), getInput(), csl::NullIO::getInput(), csl::AUIO::getInput(), csl::PAIO::initialize(), csl::PAIO::open(), and pa_callback().
the output buffer I use (passed to nextBuffer calls)
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::close(), csl::StdIO::FeederFunction(), csl::NullIO::FeederFunction(), csl::PAIO::initialize(), JackCallback(), csl::PAIO::open(), pa_callback(), and RenderCallback().
| unsigned* csl::IO::mChannelMap |
| unsigned csl::IO::mNumFramesPlayed |
counter of frames I've played
Referenced by csl::JUCEIO::audioDeviceIOCallback(), pa_callback(), RenderCallback(), csl::AUIO::start(), and csl::FileIO::writeNextBuffer().
| unsigned csl::IO::mSequence |
| unsigned csl::IO::mLoggingPeriod |
| unsigned csl::IO::mNumInChannels |
# inputs
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::initialize(), and pa_callback().
| unsigned csl::IO::mNumOutChannels |
| unsigned csl::IO::mNumRealInChannels |
| unsigned csl::IO::mNumRealOutChannels |
status flag
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::close(), csl::PAIO::initialize(), JackCallback(), csl::PAIO::open(), pa_callback(), csl::PAIO::PAIO(), csl::PAIO::start(), csl::PAIO::stop(), and csl::PAIO::~PAIO().
struct timeval mThen csl::IO::mNow [read] |
| long csl::IO::mTimeVals |
Referenced by csl::PAIO::open(), csl::FileIO::open(), csl::AUIO::open(), and csl::FileIO::threadFunction().
| long csl::IO::mThisSec |
Referenced by csl::PAIO::open(), csl::FileIO::open(), csl::AUIO::open(), and csl::FileIO::threadFunction().
| long csl::IO::mTimeSum |
for printing run-time statistics print the CPU usage message
Referenced by csl::PAIO::open(), csl::FileIO::open(), csl::AUIO::open(), and csl::FileIO::threadFunction().
1.5.8