#include <iso_synth_output_file.h>
Inherits iso::synth::OutputUnit.
Inheritance diagram for iso::synth::OutputFile:
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 | |
Buffer * | mRawBuffer |
raw sound data buffer | |
String | mFileName |
sound file name; | |
SoundFile * | mSoundFile |
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 |
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.
OutputFile::OutputFile | ( | String | pFileName | ) | throw (SynthException) |
parameter based contructor
pFileName | sound file name |
OutputFile::OutputFile | ( | String | pName, | |
String | pFileName | |||
) | throw (SynthException) |
parameter based contructor
pName | unit name | |
pFileName | sound file name |
OutputFile::OutputFile | ( | String | pFileName, | |
unsigned int | pChannelCount | |||
) | throw (SynthException) |
parameter based contructor
pFileName | sound file name | |
pChannelCount | number of channels |
OutputFile::OutputFile | ( | String | pName, | |
String | pFileName, | |||
unsigned int | pChannelCount | |||
) | throw (SynthException) |
parameter based contructor
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
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
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
pValues | unit values |
SynthException | failed to create unit |
OutputFile::~OutputFile | ( | ) | throw (SynthException) |
destructor
OutputFile::OutputFile | ( | ) | [protected] |
default constructor
void OutputFile::process | ( | Buffer * | pBuffer = NULL |
) | throw (SynthException) [virtual] |
String OutputFile::info | ( | bool | pPropagate = false , |
|
bool | pShowPorts = true | |||
) | const [virtual] |
obtain textual unit information
pPropagate | if true, the unit calls the info methods of its input ports | |
pShowPorts | print port information |
Reimplemented from iso::synth::OutputUnit.
void OutputFile::init | ( | ) | [protected] |
initializes wavetable and control ports
const String OutputFile::sClassName [static] |
unsigned int OutputFile::sUnitCount [static, protected] |
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