#include <RtAudioInterface.h>
Public Member Functions | |
RtAudioInterface (JackTrip *jacktrip, int NumInChans=2, int NumOutChans=2, audioBitResolutionT AudioBitResolution=BIT16) | |
The class constructor. | |
virtual | ~RtAudioInterface () |
virtual void | listAllInterfaces () |
virtual void | setup () |
Setup the client. | |
virtual void | close () |
virtual int | startProcess () const |
virtual int | stopProcess () const |
virtual void | appendProcessPlugin (ProcessPlugin *) |
virtual void | connectDefaultPorts () |
virtual uint32_t | getSampleRate () const |
Get the Jack Server Sampling Rate, in samples/second. | |
virtual uint32_t | getBufferSizeInSamples () const |
virtual samplingRateT | getSampleRateType () const |
Get the Jack Server Sampling Rate Enum Type samplingRateT. | |
virtual void | setClientName (const char *) |
Set Client Name to something different that the default (JackTrip). | |
Private Member Functions | |
int | RtAudioCallback (void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status) |
void | printDeviceInfo (unsigned int deviceId) |
Static Private Member Functions | |
static int | wrapperRtAudioCallback (void *outputBuffer, void *inputBuffer, unsigned int nFrames, double streamTime, RtAudioStreamStatus status, void *userData) |
Private Attributes | |
JackTrip * | mJackTrip |
int8_t * | mInputPacket |
Packet containing all the channels to read from the RingBuffer. | |
int8_t * | mOutputPacket |
Packet containing all the channels to send to the RingBuffer. | |
QVarLengthArray< float * > | mInBuffer |
Vector of Input buffers/channel read from JACK. | |
QVarLengthArray< float * > | mOutBuffer |
Vector of Output buffer/channel to write to JACK. | |
uint32_t | mSamplingRate |
uint32_t | mBufferSize |
RtAudio * | mRtAudio |
RtAudio class. |
RtAudioInterface::RtAudioInterface | ( | JackTrip * | jacktrip, | |
int | NumInChans = 2 , |
|||
int | NumOutChans = 2 , |
|||
audioBitResolutionT | AudioBitResolution = BIT16 | |||
) |
The class constructor.
jacktrip | Pointer to the JackTrip class that connects all classes (mediator) | |
NumInChans | Number of Input Channels | |
NumOutChans | Number of Output Channels | |
AudioBitResolution | Audio Sample Resolutions in bits | |
ClientName | Client name in Jack |
RtAudioInterface::~RtAudioInterface | ( | ) | [virtual] |
void RtAudioInterface::listAllInterfaces | ( | ) | [virtual] |
void RtAudioInterface::setup | ( | ) | [virtual] |
Setup the client.
This will set the audio client with the specified Sampling Rate, Packet Size, Bit Resolution, etc...
Implements AudioInterface.
virtual void RtAudioInterface::close | ( | ) | [inline, virtual] |
Implements AudioInterface.
int RtAudioInterface::startProcess | ( | ) | const [virtual] |
Implements AudioInterface.
virtual int RtAudioInterface::stopProcess | ( | ) | const [inline, virtual] |
Implements AudioInterface.
virtual void RtAudioInterface::appendProcessPlugin | ( | ProcessPlugin * | ) | [inline, virtual] |
Reimplemented from AudioInterface.
virtual void RtAudioInterface::connectDefaultPorts | ( | ) | [inline, virtual] |
Implements AudioInterface.
virtual uint32_t RtAudioInterface::getSampleRate | ( | ) | const [inline, virtual] |
virtual uint32_t RtAudioInterface::getBufferSizeInSamples | ( | ) | const [inline, virtual] |
Reimplemented from AudioInterface.
virtual samplingRateT RtAudioInterface::getSampleRateType | ( | ) | const [inline, virtual] |
Get the Jack Server Sampling Rate Enum Type samplingRateT.
Implements AudioInterface.
virtual void RtAudioInterface::setClientName | ( | const char * | ClientName | ) | [inline, virtual] |
int RtAudioInterface::RtAudioCallback | ( | void * | outputBuffer, | |
void * | inputBuffer, | |||
unsigned int | nFrames, | |||
double | streamTime, | |||
RtAudioStreamStatus | status | |||
) | [private] |
int RtAudioInterface::wrapperRtAudioCallback | ( | void * | outputBuffer, | |
void * | inputBuffer, | |||
unsigned int | nFrames, | |||
double | streamTime, | |||
RtAudioStreamStatus | status, | |||
void * | userData | |||
) | [static, private] |
void RtAudioInterface::printDeviceInfo | ( | unsigned int | deviceId | ) | [private] |
JackTrip* RtAudioInterface::mJackTrip [private] |
Reimplemented from AudioInterface.
int8_t* RtAudioInterface::mInputPacket [private] |
Packet containing all the channels to read from the RingBuffer.
int8_t* RtAudioInterface::mOutputPacket [private] |
Packet containing all the channels to send to the RingBuffer.
QVarLengthArray<float*> RtAudioInterface::mInBuffer [private] |
Vector of Input buffers/channel read from JACK.
QVarLengthArray<float*> RtAudioInterface::mOutBuffer [private] |
Vector of Output buffer/channel to write to JACK.
uint32_t RtAudioInterface::mSamplingRate [private] |
uint32_t RtAudioInterface::mBufferSize [private] |
Reimplemented from AudioInterface.
RtAudio* RtAudioInterface::mRtAudio [private] |
RtAudio class.