iso::synth::OutputFile Class Reference

unit that writes all audio it receives into a file More...

#include <iso_synth_output_file.h>

Inherits iso::synth::OutputUnit.

Inheritance diagram for iso::synth::OutputFile:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 OutputFile (String pFileName) throw (SynthException)
 parameter based contructor
 OutputFile (String pName, String pFileName) throw (SynthException)
 parameter based contructor
 OutputFile (String pFileName, unsigned int pChannelCount) throw (SynthException)
 parameter based contructor
 OutputFile (String pName, String pFileName, unsigned int pChannelCount) throw (SynthException)
 parameter based contructor
 OutputFile (String pFileName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, FanInType pFanInType=FANIN_ADD) throw (SynthException)
 parameter based contructor
 OutputFile (String pName, String pFileName, unsigned int pFrameCount, unsigned int pChannelCount, unsigned int pRate, FanInType pFanInType=FANIN_ADD) throw (SynthException)
 parameter based contructor
 OutputFile (const data::Values &pValues) throw (SynthException)
 values based constructor
 ~OutputFile () throw (SynthException)
 destructor
virtual void process (Buffer *pBuffer=NULL) throw (SynthException)
 processes buffer
virtual String info (bool pPropagate=false, bool pShowPorts=true) const
 obtain textual unit information

Static Public Attributes

static const String sClassName
 default name

Protected Member Functions

 OutputFile ()
 default constructor
void init ()
 initializes wavetable and control ports

Protected Attributes

BuffermRawBuffer
 raw sound data buffer
String mFileName
 sound file name;
SoundFilemSoundFile
 sound file
SoundFileInfo mSoundFileInfo
 information on sound file

Static Protected Attributes

static unsigned int sUnitCount
 total number of units created so far
static QHash< String, int > sFileFormats
 file ending / file format association

Detailed Description

unit that writes all audio it receives into a file

writes all audio it receives into a file

This class expands the output unit base class.
The class writes an audio data it receives at the input port into an audio file.
For the moment, the following audio file formats are supported:
.wav .aiff/.aif .raw
It distinguishes between different output file formats based on the filename suffix.
The number of audio channels in the output sound file is equivalent to the number of audio channels in the audio data arriving at the input port.
This number of channels must be larger than zero but can be arbitrarly high.
As soon as the Synth singleton instance is destroyed, the output audio file is finalized and becomes readable.
If the program stops without destroying the Synth properly, the file will be not readable.

SwitchPorts:
name: active channelCount: 1 resizable: false function: setActive


Created by Daniel Bisig on 9/07/06.


Constructor & Destructor Documentation

OutputFile::OutputFile ( String  pFileName  )  throw (SynthException)

parameter based contructor

Parameters:
pFileName sound file name

OutputFile::OutputFile ( String  pName,
String  pFileName 
) throw (SynthException)

parameter based contructor

Parameters:
pName unit name
pFileName sound file name

OutputFile::OutputFile ( String  pFileName,
unsigned int  pChannelCount 
) throw (SynthException)

parameter based contructor

Parameters:
pFileName sound file name
pChannelCount number of channels

OutputFile::OutputFile ( String  pName,
String  pFileName,
unsigned int  pChannelCount 
) throw (SynthException)

parameter based contructor

Parameters:
pName unit name
pFileName sound file name
pChannelCount number of channels

OutputFile::OutputFile ( String  pFileName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
FanInType  pFanInType = FANIN_ADD 
) throw (SynthException)

parameter based contructor

Parameters:
pFileName sound file name
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pFanInType strategy for combining audio buffers in case this unit is connected to several units

OutputFile::OutputFile ( String  pName,
String  pFileName,
unsigned int  pFrameCount,
unsigned int  pChannelCount,
unsigned int  pRate,
FanInType  pFanInType = FANIN_ADD 
) throw (SynthException)

parameter based contructor

Parameters:
pName unit name
pFileName sound file name
pFrameCount number of frames
pChannelCount number of channels
pRate samping rate
pFanInType strategy for combining audio buffers in case this unit is connected to several units

OutputFile::OutputFile ( const data::Values &  pValues  )  throw (SynthException)

values based constructor

Parameters:
pValues unit values
Exceptions:
SynthException failed to create unit
pValues structure & data types: 0: const String& : unit name 1: const String& : file name 2: unsigned int : number of frames 3: unsigned int : number of channels 4: unsigned int : samping rate

OutputFile::~OutputFile (  )  throw (SynthException)

destructor

OutputFile::OutputFile (  )  [protected]

default constructor


Member Function Documentation

void OutputFile::process ( Buffer pBuffer = NULL  )  throw (SynthException) [virtual]

processes buffer

Parameters:
pBuffer buffer to process

Reimplemented from iso::synth::OutputUnit.

String OutputFile::info ( bool  pPropagate = false,
bool  pShowPorts = true 
) const [virtual]

obtain textual unit information

Parameters:
pPropagate if true, the unit calls the info methods of its input ports
pShowPorts print port information
Returns:
String containing unit information

Reimplemented from iso::synth::OutputUnit.

void OutputFile::init (  )  [protected]

initializes wavetable and control ports


Member Data Documentation

const String OutputFile::sClassName [static]

default name

Reimplemented from iso::synth::OutputUnit.

unsigned int OutputFile::sUnitCount [static, protected]

total number of units created so far

Reimplemented from iso::synth::OutputUnit.

Buffer* iso::synth::OutputFile::mRawBuffer [protected]

raw sound data buffer

String iso::synth::OutputFile::mFileName [protected]

sound file name;

SoundFile* iso::synth::OutputFile::mSoundFile [protected]

sound file

SoundFileInfo iso::synth::OutputFile::mSoundFileInfo [protected]

information on sound file

QHash< String, int > OutputFile::sFileFormats [static, protected]

file ending / file format association


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