A sound file output component.
More...
#include <mipsndfileoutput.h>
List of all members.
Public Member Functions |
| bool | open (const std::string &fname, int sampRate, int channels, int bytesPerSample, bool append) |
| | Opens a sound file.
|
| bool | close () |
| | Closes the sound file.
|
| int | getSamplingRate () const |
| | Returns the sampling rate of the file.
|
| int | getNumberOfChannels () const |
| | Returns the number of channels in the file.
|
Detailed Description
This component writes incoming sound data to a file. It uses libsndfile to accomplish this. Incoming messages have to be floating point raw audio messages. No messages are generated by this component.
Member Function Documentation
| bool MIPSndFileOutput::close |
( |
| ) |
|
Using this function, a previously opened sound file can be closed again.
| int MIPSndFileOutput::getNumberOfChannels |
( |
| ) |
const [inline] |
| int MIPSndFileOutput::getSamplingRate |
( |
| ) |
const [inline] |
| bool MIPSndFileOutput::open |
( |
const std::string & |
fname, |
|
|
int |
sampRate, |
|
|
int |
channels, |
|
|
int |
bytesPerSample, |
|
|
bool |
append |
|
) |
| |
This function opens a sound file. If the file does not exist, the following parameters are used in the creation of the file. If the file does exist and the append parameter is true, the corresponding parameters are read from the existing file.
- Parameters:
-
| fname | The name of the file. |
| sampRate | The sampling rate. |
| channels | The number of channels. |
| bytesPerSample | The number of bytes per sample. Can be either 1, 2 or 4. |
| append | Flag to indicate if new data should be added to the end of an existing file or if the file should be overwritten if it exists. |
The documentation for this class was generated from the following file: