#include <iso_synth_audio_port.h>
Inherits iso::synth::Port.
Inherited by iso::synth::InputPort, and iso::synth::OutputPort.
Inheritance diagram for iso::synth::AudioPort:
Public Member Functions | |
AudioPort (Unit *pUnit) | |
parameter based contructor | |
AudioPort (Unit *pUnit, unsigned int pFrameCount, unsigned int pChannelCount, sample pRate) | |
parameter based contructor | |
virtual | ~AudioPort () |
destructor | |
Unit * | unit () |
return unit this audio port is associated with | |
unsigned int | channelCount () const |
return channel count | |
unsigned int | frameCount () const |
return frame count | |
sample | rate () const |
return frame rate | |
bool | isConnected () |
returns true if audioport is connected to any links | |
Links * | links () |
returns associtated links | |
virtual void | setChannelCount (unsigned int pChannelCount) throw (SynthException) |
set channel count | |
virtual void | setFrameCount (unsigned int pFrameCount) throw (SynthException) |
set frame count | |
virtual void | setRate (sample pRate) throw (SynthException) |
set frame rate | |
void | addPortProcessListener (PortProcessListener *pPortProcessListener) |
add port process listener | |
unsigned long | processStep () |
returns process step | |
virtual void | addLink (Link *pLink)=0 |
add link to port | |
void | addPortConnectListener (PortConnectListener *pPortConnectListener) |
add port connect listener | |
virtual void | removeLink (Link *pLink)=0 |
removes link from output port | |
virtual void | process (Buffer *pBuffer)=0 |
signal processing function | |
virtual String | info (bool pPropagate=false) const |
print info | |
Static Public Attributes | |
static const String | sClassName |
default name | |
Protected Member Functions | |
AudioPort () | |
default constructor | |
void | createName (const String &pPortName) |
creates a full input port name by concatenating it's unit name and port name | |
Protected Attributes | |
Unit * | mUnit |
unsigned int | mFrameCount |
unit this port is associated with port frame count | |
unsigned int | mChannelCount |
port channel count | |
sample | mRate |
port frame rate | |
QVector< PortProcessListener * > | mPortProcessListeners |
port process listeners | |
Links | mLinks |
associated links | |
PortConnectionStrategy * | mStrategy |
port connection strategy | |
QVector< PortConnectListener * > | mPortConnectListeners |
port connect listeners | |
unsigned long | mProcessStep |
number of times the port has executed it's process function | |
Friends | |
std::ostream & | operator<< (std::ostream &pOstream, const AudioPort &pAudioPort) |
print audio port information |
of all audio port classes
Abstract Audio Port class. Audio Ports are part of units and pass data (audio buffers, control data) from units to links and vice versa.
Created by Daniel Bisig on 5/17/06. Copyright 2006 Daniel Bisig All rights reserved.
AudioPort::AudioPort | ( | Unit * | pUnit | ) |
parameter based contructor
pUnit | synth unit this port is attached to |
AudioPort::AudioPort | ( | Unit * | pUnit, | |
unsigned int | pFrameCount, | |||
unsigned int | pChannelCount, | |||
sample | pRate | |||
) |
parameter based contructor
pUnit | synth unit this port is attached to | |
pFrameCount | frame count | |
pChannelCount | channel count | |
pRate | frame rate |
AudioPort::~AudioPort | ( | ) | [virtual] |
destructor
AudioPort::AudioPort | ( | ) | [protected] |
default constructor
Unit * AudioPort::unit | ( | ) |
return unit this audio port is associated with
Reimplemented in iso::synth::ControlPort.
unsigned int AudioPort::channelCount | ( | ) | const |
unsigned int AudioPort::frameCount | ( | ) | const |
sample AudioPort::rate | ( | ) | const |
bool AudioPort::isConnected | ( | ) |
returns true if audioport is connected to any links
Links * AudioPort::links | ( | ) |
returns associtated links
void AudioPort::setChannelCount | ( | unsigned int | pChannelCount | ) | throw (SynthException) [virtual] |
set channel count
pChannelCount | channel count |
SynthException | channel count change not possible |
Reimplemented in iso::synth::ControlPort, and iso::synth::OutputPort.
void AudioPort::setFrameCount | ( | unsigned int | pFrameCount | ) | throw (SynthException) [virtual] |
set frame count
pFrameCount | frame count |
SynthException | frame count not a power of two or frame count change not possible |
Reimplemented in iso::synth::ControlPort, and iso::synth::OutputPort.
void AudioPort::setRate | ( | sample | pRate | ) | throw (SynthException) [virtual] |
set frame rate
pRate | frame rate |
SynthException | frame rate change not possible |
Reimplemented in iso::synth::OutputPort.
void AudioPort::addPortProcessListener | ( | PortProcessListener * | pPortProcessListener | ) |
add port process listener
pPortProcessListener | port process listener |
unsigned long AudioPort::processStep | ( | ) |
returns process step
void AudioPort::addLink | ( | Link * | pLink | ) | [pure virtual] |
add link to port
pLink | link that is added to port |
Implemented in iso::synth::InputPort, and iso::synth::OutputPort.
void AudioPort::addPortConnectListener | ( | PortConnectListener * | pPortConnectListener | ) |
add port connect listener
pPortConnectListener | port connect listener |
void AudioPort::removeLink | ( | Link * | pLink | ) | [pure virtual] |
removes link from output port
pLink | link that is removed from port |
Implemented in iso::synth::InputPort, and iso::synth::OutputPort.
void AudioPort::process | ( | Buffer * | pBuffer | ) | [pure virtual] |
signal processing function
pBuffer | signal data |
Implemented in iso::synth::ControlPort, iso::synth::InputPort, iso::synth::InternalPort, and iso::synth::OutputPort.
String AudioPort::info | ( | bool | pPropagate = false |
) | const [virtual] |
print info
pPropagate | if true, the info method invocation travels up the unit patch |
Reimplemented from iso::synth::Port.
Reimplemented in iso::synth::ControlPort, iso::synth::InputPort, and iso::synth::OutputPort.
void AudioPort::createName | ( | const String & | pPortName | ) | [protected] |
creates a full input port name by concatenating it's unit name and port name
pPortName | port name |
std::ostream& operator<< | ( | std::ostream & | pOstream, | |
const AudioPort & | pAudioPort | |||
) | [friend] |
print audio port information
const String AudioPort::sClassName [static] |
default name
Reimplemented from iso::synth::Port.
Reimplemented in iso::synth::ControlPort, iso::synth::InputPort, and iso::synth::OutputPort.
Unit* iso::synth::AudioPort::mUnit [protected] |
unsigned int iso::synth::AudioPort::mFrameCount [protected] |
unit this port is associated with port frame count
usually the same as unit frame count might differ from unit value if the unit changes frame count
unsigned int iso::synth::AudioPort::mChannelCount [protected] |
port channel count
usually the same as unit channel count might differ from unit value if the unit changes channel count
sample iso::synth::AudioPort::mRate [protected] |
port frame rate
usually the same as unit frame rate might differ from unit value if the unit changes frame rate
QVector<PortProcessListener*> iso::synth::AudioPort::mPortProcessListeners [protected] |
port process listeners
Links iso::synth::AudioPort::mLinks [protected] |
associated links
an port can be associated with any number of links
PortConnectionStrategy* iso::synth::AudioPort::mStrategy [protected] |
port connection strategy
QVector<PortConnectListener*> iso::synth::AudioPort::mPortConnectListeners [protected] |
port connect listeners
unsigned long iso::synth::AudioPort::mProcessStep [protected] |
number of times the port has executed it's process function