|
CSL
5.2
|
NullIO is an IO that uses a thread and a timer to call its graph's nextBuffer(); it doesn't do anything with the resulting buffer, but assumes that other objects (observers of the graph) will handle some actual IO. More...
#include <NullIO.h>
Inheritance diagram for csl::NullIO:Public Member Functions | |
| NullIO () | |
| Constructor. | |
| NullIO (unsigned s_rate, unsigned b_size, int in_device=0, int out_device=0, unsigned in_chans=0, unsigned out_chans=2) | |
| virtual | ~NullIO () |
| virtual void | start () throw (CException) |
| start my timer thread | |
| virtual void | stop () throw (CException) |
| stop the timer thread | |
| virtual Buffer & | getInput () throw (CException) |
| Get the current input from the sound card. | |
| virtual Buffer & | getInput (unsigned numFrames, unsigned numChannels) throw (CException) |
| virtual void | open () throw (CException) |
| virtual void | close () throw (CException) |
| open/close start/stop methods | |
| 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 | |
| unsigned | getAndIncrementSequence () |
| increment and answer my seq # | |
| void | attachObserver (Observer *) |
| (possibly notify obersvers on my death) | |
| void | detachObserver (Observer *) |
| void | changed (void *argument) |
| this is what I send to myself to notify my observers; It's not overridden in general. It results in the observers receiving update() calls < override evaluate to filter updates to the observer map | |
| virtual int | evaluate (void *argument) |
| int | createThread (VoidFcnPtr *func, void *args) |
Static Public Member Functions | |
| static CThread * | MakeThread () |
| factory method | |
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 | |
| bool | mInterleaved |
| flag if IO is interleaved | |
| pthread_attr_t | mAttributes |
Protected Member Functions | |
| virtual void | initialize (unsigned sr, unsigned bs, int is, int os, unsigned ic, unsigned oc) |
| initialize overridden in subclasses | |
Static Protected Member Functions | |
| static void * | FeederFunction (void *arg) |
| shared init function | |
Protected Attributes | |
| bool | mRunning |
| juce::Thread * | mThread |
| whether or not I'm running | |
| Synch * | mSynch |
| the sync I wait on | |
NullIO is an IO that uses a thread and a timer to call its graph's nextBuffer(); it doesn't do anything with the resulting buffer, but assumes that other objects (observers of the graph) will handle some actual IO.
| NullIO::NullIO | ( | ) |
Constructor.
Definition at line 12 of file NullIO.cpp.
References csl::Synch::MakeSynch(), csl::CThread::MakeThread(), mSynch, and mThread.
| NullIO::NullIO | ( | unsigned | s_rate, |
| unsigned | b_size, | ||
| int | in_device = 0, |
||
| int | out_device = 0, |
||
| unsigned | in_chans = 0, |
||
| unsigned | out_chans = 2 |
||
| ) |
Definition at line 17 of file NullIO.cpp.
|
virtual |
Definition at line 24 of file NullIO.cpp.
|
virtual |
start my timer thread
< start my timer thread
whether or not I'm running
Reimplemented from csl::IO.
Reimplemented in csl::StdIO.
Definition at line 41 of file NullIO.cpp.
References FeederFunction(), mRunning, and mThread.
|
virtual |
stop the timer thread
< stop the timer thread
Reimplemented from csl::IO.
Reimplemented in csl::StdIO.
Definition at line 46 of file NullIO.cpp.
References csl::Synch::condSignal(), mRunning, and mSynch.
|
inlinevirtual |
Get the current input from the sound card.
Reimplemented from csl::IO.
Definition at line 33 of file NullIO.h.
References csl::IO::mInputBuffer.
|
inlinevirtual |
|
staticprotected |
shared init function
Reimplemented in csl::StdIO.
Definition at line 28 of file NullIO.cpp.
References csl::Synch::condWait(), csl::Synch::lock(), csl::IO::mOutputBuffer, mRunning, mSynch, csl::IO::pullInput(), and csl::Synch::unlock().
Referenced by start().
|
inlinevirtualinherited |
Reimplemented in csl::iPhoneIO, csl::RemoteIO, csl::CAIO, csl::AUIO, csl::JackIO, csl::PAIO, csl::VSTIO, csl::FileIO, csl::AUIO, and csl::JUCEIO.
Definition at line 723 of file CSL_Core.h.
References csl::kIOOpen.
Referenced by main().
|
inlinevirtualinherited |
open/close start/stop methods
Reimplemented in csl::iPhoneIO, csl::RemoteIO, csl::CAIO, csl::FileIO, csl::PAIO, csl::AUIO, csl::JackIO, csl::VSTIO, csl::AUIO, and csl::JUCEIO.
Definition at line 724 of file CSL_Core.h.
References csl::kIOClosed.
Referenced by csl::CSLService::stop().
|
inlinevirtualinherited |
Reimplemented in csl::FileIO, and csl::PAIO.
Definition at line 727 of file CSL_Core.h.
|
inherited |
test the IO's graph
Definition at line 1249 of file CSL_Core.cpp.
References csl::UnitGenerator::addOutput(), and csl::IO::mGraph.
Referenced by main(), and csl::VSTIO::VSTIO().
|
inherited |
set/clear my graph root generator
Definition at line 1254 of file CSL_Core.cpp.
References csl::IO::mGraph, and csl::UnitGenerator::removeOutput().
|
inherited |
get a buffer from the CSL graph
Definition at line 1269 of file CSL_Core.cpp.
References GET_TIME, csl::kLogError, csl::logMsg(), and csl::CException::mMessage.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), FeederFunction(), csl::StdIO::FeederFunction(), JackCallback(), pa_callback(), csl::VSTIO::processReplacing(), and RenderCallback().
|
inherited |
increment and answer my seq #
Definition at line 1262 of file CSL_Core.cpp.
References csl::IO::mSequence.
|
inlineprotectedvirtualinherited |
initialize overridden in subclasses
Reimplemented in csl::PAIO.
Definition at line 765 of file CSL_Core.h.
|
inherited |
(possibly notify obersvers on my death)
register/remove observers
Definition at line 491 of file CGestalt.cpp.
References csl::logMsg(), csl::Observer::mKey, and csl::Observer::mPeriod.
Referenced by csl::SpatialPanner::setSpeakerLayout().
|
inherited |
Definition at line 507 of file CGestalt.cpp.
References csl::logMsg().
Referenced by csl::SpatialPanner::setSpeakerLayout(), and csl::SpatialPanner::~SpatialPanner().
|
inherited |
this is what I send to myself to notify my observers; It's not overridden in general. It results in the observers receiving update() calls < override evaluate to filter updates to the observer map
Definition at line 529 of file CGestalt.cpp.
References csl::logMsg().
Referenced by csl::SpeakerLayout::addSpeaker(), csl::MIDIIn::handleIncomingMidiMessage(), and csl::SpeakerLayout::setDefaultSpeakerLayout().
|
inlinevirtualinherited |
Reimplemented in csl::MIDIIn.
Definition at line 259 of file CGestalt.h.
|
virtualinherited |
Implements csl::CThread.
Definition at line 100 of file ThreadUtilities.cpp.
References csl::ThreadPthread::mAttributes, and csl::ThreadPthread::mThread.
Referenced by PME::start_management_thread().
|
staticinherited |
factory method
Definition at line 40 of file ThreadUtilities.cpp.
Referenced by csl::GrainCloud::GrainCloud(), NullIO(), csl::FileIO::open(), and csl::StdIO::StdIO().
|
protected |
Definition at line 34 of file NullIO.h.
Referenced by FeederFunction(), csl::StdIO::FeederFunction(), start(), and stop().
|
protected |
whether or not I'm running
my timer thread
Reimplemented from csl::ThreadPthread.
Definition at line 38 of file NullIO.h.
Referenced by NullIO(), start(), and csl::StdIO::StdIO().
|
protected |
the sync I wait on
Definition at line 39 of file NullIO.h.
Referenced by FeederFunction(), csl::StdIO::FeederFunction(), NullIO(), csl::StdIO::StdIO(), and stop().
|
inherited |
the root of my client DSP graph, often a mixer or panner
Definition at line 739 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::IO::clearRoot(), pa_callback(), csl::VSTIO::processReplacing(), RenderCallback(), csl::VSTIO::setProgramName(), csl::IO::setRoot(), csl::PAIO::test(), and csl::FileIO::writeNextBuffer().
|
inherited |
the most recent input buffer (if it's turned on)
Definition at line 740 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::close(), csl::AUIO::getInput(), getInput(), csl::IO::getInput(), csl::PAIO::initialize(), csl::PAIO::open(), pa_callback(), and csl::VSTIO::processReplacing().
|
inherited |
the output buffer I use (passed to nextBuffer calls)
Definition at line 741 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::close(), FeederFunction(), csl::StdIO::FeederFunction(), csl::PAIO::initialize(), JackCallback(), csl::PAIO::open(), pa_callback(), csl::VSTIO::processReplacing(), and RenderCallback().
|
inherited |
the buffer for holding the sound card input (if open)
Definition at line 742 of file CSL_Core.h.
Referenced by pa_callback().
|
inherited |
the output channel remapping array
Definition at line 743 of file CSL_Core.h.
Referenced by csl::PAIO::initialize().
|
inherited |
counter of frames I've played
Definition at line 745 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), pa_callback(), RenderCallback(), csl::AUIO::start(), and csl::FileIO::writeNextBuffer().
|
inherited |
sequence counter
Definition at line 746 of file CSL_Core.h.
Referenced by csl::IO::getAndIncrementSequence().
|
inherited |
logging period in seconds
Definition at line 747 of file CSL_Core.h.
|
inherited |
Definition at line 748 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::initialize(), and pa_callback().
|
inherited |
Definition at line 749 of file CSL_Core.h.
Referenced by csl::JUCEIO::audioDeviceIOCallback(), csl::PAIO::initialize(), and csl::VSTIO::processReplacing().
|
inherited |
|
inherited |
|
inherited |
status flag
Definition at line 752 of file CSL_Core.h.
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().
|
inherited |
flag if IO is interleaved
Definition at line 753 of file CSL_Core.h.
Referenced by csl::InOut::InOut(), and csl::VSTIO::VSTIO().
|
inherited |
Definition at line 90 of file ThreadUtilities.h.
Referenced by csl::ThreadPthread::createThread(), csl::ThreadPthread::ThreadPthread(), and csl::ThreadPthread::~ThreadPthread().