#include <PAIO.h>

Public Member Functions | |
| PAIO (unsigned s_rate=CSL_mFrameRate, unsigned b_size=CSL_mBlockSize, int in_device=-1, int out_device=-1, unsigned in_chans=0, unsigned out_chans=2) | |
| ~PAIO () | |
| Destructor. | |
| void | open () throw (CException) |
| open the IO | |
| void | start () throw (CException) |
| start the callbacks | |
| void | stop () throw (CException) |
| stop the callbacks | |
| void | close () throw (CException) |
| close the IO | |
| void | test () throw (CException) |
| test the IO's graph | |
Public Attributes | |
| PaStream * | mStream |
| the PortAudio stream we play out/get data from | |
Protected Member Functions | |
| void | handleError (PaError result) throw (CException) |
| print the error message | |
| void | initialize (unsigned sr, unsigned bs, int is, int os, unsigned ic, unsigned oc) |
| Actually initialize PortAudio driver. | |
Protected Attributes | |
| PaStreamParameters * | mInputParameters |
| PA IO stream parameters. | |
| PaStreamParameters * | mOutputParameters |
| PaDeviceIndex | mInDev |
| PaDeviceIndex | mOutDev |
| IO device numbers. | |
| IODeviceVector | mDevices |
| PAIO::PAIO | ( | unsigned | s_rate = CSL_mFrameRate, |
|
| unsigned | b_size = CSL_mBlockSize, |
|||
| int | in_device = -1, |
|||
| int | out_device = -1, |
|||
| unsigned | in_chans = 0, |
|||
| unsigned | out_chans = 2 | |||
| ) |
References initialize(), csl::kIONew, and csl::IO::mStatus.
| PAIO::~PAIO | ( | ) |
Destructor.
References close(), csl::kIOOpen, csl::kIORunning, csl::logMsg(), mInputParameters, mOutputParameters, csl::IO::mStatus, and stop().
| void PAIO::open | ( | ) | throw (CException) [virtual] |
open the IO
Reimplemented from csl::IO.
References csl::Buffer::allocateBuffers(), csl::CGestalt::blockSize(), csl::CGestalt::frameRate(), csl::Buffer::freeBuffers(), csl::kIOInit, csl::kIOOpen, csl::kLogError, csl::logMsg(), csl::Buffer::mAreBuffersAllocated, csl::IO::mInputBuffer, mInputParameters, csl::IO::mOutputBuffer, mOutputParameters, csl::IO::mStatus, mStream, csl::IO::mThisSec, csl::IO::mTimeSum, csl::IO::mTimeVals, and pa_callback().
Referenced by main().
| void PAIO::start | ( | void | ) | throw (CException) [virtual] |
start the callbacks
Reimplemented from csl::IO.
References handleError(), csl::kIOOpen, csl::kIORunning, csl::kLogError, csl::logMsg(), csl::IO::mStatus, and mStream.
Referenced by dumpTest(), and main().
| void PAIO::stop | ( | void | ) | throw (CException) [virtual] |
stop the callbacks
Reimplemented from csl::IO.
References handleError(), csl::kIOOpen, csl::kIORunning, csl::kLogError, csl::logMsg(), csl::IO::mStatus, and mStream.
Referenced by dumpTest(), main(), and ~PAIO().
| void PAIO::close | ( | ) | throw (CException) [virtual] |
close the IO
Reimplemented from csl::IO.
References csl::Buffer::freeBuffers(), handleError(), csl::kIOInit, csl::kIOOpen, csl::kLogError, csl::logMsg(), csl::Buffer::mAreBuffersAllocated, csl::IO::mInputBuffer, csl::IO::mOutputBuffer, csl::IO::mStatus, and mStream.
| void PAIO::test | ( | ) | throw (CException) [virtual] |
test the IO's graph
Reimplemented from csl::IO.
References csl::Buffer::allocateBuffers(), csl::CGestalt::blockSize(), csl::kLogError, csl::logMsg(), csl::IO::mGraph, csl::CException::mMessage, csl::UnitGenerator::nextBuffer(), and csl::CGestalt::numOutChannels().
Referenced by dumpTest().
| void PAIO::handleError | ( | PaError | result | ) | throw (CException) [protected] |
| void PAIO::initialize | ( | unsigned | sr, | |
| unsigned | bs, | |||
| int | is, | |||
| int | os, | |||
| unsigned | ic, | |||
| unsigned | oc | |||
| ) | [protected, virtual] |
Actually initialize PortAudio driver.
Reimplemented from csl::IO.
References csl::CGestalt::blockSize(), csl_min, csl::CGestalt::frameRate(), csl::kIOInit, csl::kLogFatal, csl::logMsg(), csl::IO::mChannelMap, mDevices, csl::IODevice::mFrameRates, mInDev, csl::IO::mInputBuffer, mInputParameters, csl::IO::mNumInChannels, csl::IO::mNumOutChannels, csl::IO::mNumRealInChannels, csl::IO::mNumRealOutChannels, mOutDev, csl::IO::mOutputBuffer, mOutputParameters, csl::IO::mStatus, csl::CGestalt::numInChannels(), csl::CGestalt::numOutChannels(), csl::CGestalt::setBlockSize(), csl::CGestalt::setFrameRate(), csl::CGestalt::setNumInChannels(), csl::CGestalt::setNumOutChannels(), and csl::Buffer::setSize().
Referenced by PAIO().
| PaStream* csl::PAIO::mStream |
PaStreamParameters* csl::PAIO::mInputParameters [protected] |
PaStreamParameters* csl::PAIO::mOutputParameters [protected] |
Referenced by initialize(), open(), and ~PAIO().
PaDeviceIndex csl::PAIO::mInDev [protected] |
Referenced by initialize().
PaDeviceIndex csl::PAIO::mOutDev [protected] |
IODeviceVector csl::PAIO::mDevices [protected] |
Referenced by initialize().
1.5.8