iso::synth::AudioPort Class Reference

the mother of all audio port classes More...

#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:

Inheritance graph
[legend]
Collaboration diagram for iso::synth::AudioPort:

Collaboration graph
[legend]
List of all members.

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
Unitunit ()
 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
Linkslinks ()
 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

UnitmUnit
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
PortConnectionStrategymStrategy
 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

Detailed Description

the mother of all audio port classes

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.


Constructor & Destructor Documentation

AudioPort::AudioPort ( Unit pUnit  ) 

parameter based contructor

Parameters:
pUnit synth unit this port is attached to

AudioPort::AudioPort ( Unit pUnit,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
sample  pRate 
)

parameter based contructor

Parameters:
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


Member Function Documentation

Unit * AudioPort::unit (  ) 

return unit this audio port is associated with

Returns:
unit this audio port is associated with

Reimplemented in iso::synth::ControlPort.

unsigned int AudioPort::channelCount (  )  const

return channel count

Returns:
channel count

Reimplemented in iso::synth::ControlPort.

unsigned int AudioPort::frameCount (  )  const

return frame count

Returns:
frame count

Reimplemented in iso::synth::ControlPort.

sample AudioPort::rate (  )  const

return frame rate

Returns:
frame rate

Reimplemented in iso::synth::ControlPort.

bool AudioPort::isConnected (  ) 

returns true if audioport is connected to any links

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

Parameters:
pChannelCount channel count
Exceptions:
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

Parameters:
pFrameCount frame count
Exceptions:
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

Parameters:
pRate frame rate
Exceptions:
SynthException frame rate change not possible

Reimplemented in iso::synth::OutputPort.

void AudioPort::addPortProcessListener ( PortProcessListener pPortProcessListener  ) 

add port process listener

Parameters:
pPortProcessListener port process listener

unsigned long AudioPort::processStep (  ) 

returns process step

Returns:
process step

void AudioPort::addLink ( Link pLink  )  [pure virtual]

add link to port

Parameters:
pLink link that is added to port
warning, this method does not check whether units connect multiple times!

Implemented in iso::synth::InputPort, and iso::synth::OutputPort.

void AudioPort::addPortConnectListener ( PortConnectListener pPortConnectListener  ) 

add port connect listener

Parameters:
pPortConnectListener port connect listener

void AudioPort::removeLink ( Link pLink  )  [pure virtual]

removes link from output port

Parameters:
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

Parameters:
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

Parameters:
pPropagate if true, the info method invocation travels up the unit patch
prints some unit properties to the console

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

Parameters:
pPortName port name


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const AudioPort pAudioPort 
) [friend]

print audio port information


Member Data Documentation

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


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:18:42 2011 for synth by  doxygen 1.5.1