Blender V2.61 - r43446
|
#include <AUD_SndFileWriter.h>
Public Member Functions | |
AUD_SndFileWriter (std::string filename, AUD_DeviceSpecs specs, AUD_Container format, AUD_Codec codec, unsigned int bitrate) | |
virtual | ~AUD_SndFileWriter () |
virtual int | getPosition () const |
virtual AUD_DeviceSpecs | getSpecs () const |
virtual void | write (unsigned int length, sample_t *buffer) |
This class writes a sound file via libsndfile.
Definition at line 41 of file AUD_SndFileWriter.h.
AUD_SndFileWriter::AUD_SndFileWriter | ( | std::string | filename, |
AUD_DeviceSpecs | specs, | ||
AUD_Container | format, | ||
AUD_Codec | codec, | ||
unsigned int | bitrate | ||
) |
Creates a new writer.
filename | The path to the file to be read. |
specs | The file's audio specification. |
format | The file's container format. |
codec | The codec used for encoding the audio data. |
bitrate | The bitrate for encoding. |
AUD_Exception | Thrown if the file specified cannot be written with libsndfile. |
Definition at line 37 of file AUD_SndFileWriter.cpp.
References AUD_CODEC_VORBIS, AUD_CONTAINER_FLAC, AUD_CONTAINER_OGG, AUD_CONTAINER_WAV, AUD_ERROR_FILE, AUD_ERROR_SPECS, AUD_FORMAT_FLOAT32, AUD_FORMAT_FLOAT64, AUD_FORMAT_S16, AUD_FORMAT_S24, AUD_FORMAT_S32, AUD_FORMAT_U8, AUD_THROW, AUD_DeviceSpecs::channels, fileopen_error, AUD_DeviceSpecs::format, format_error, and AUD_DeviceSpecs::rate.
AUD_SndFileWriter::~AUD_SndFileWriter | ( | ) | [virtual] |
Destroys the writer and closes the file.
Definition at line 119 of file AUD_SndFileWriter.cpp.
int AUD_SndFileWriter::getPosition | ( | ) | const [virtual] |
Returns how many samples have been written so far.
Implements AUD_IWriter.
Definition at line 124 of file AUD_SndFileWriter.cpp.
AUD_DeviceSpecs AUD_SndFileWriter::getSpecs | ( | ) | const [virtual] |
Returns the specification of the audio data being written into the sink.
Implements AUD_IWriter.
Definition at line 129 of file AUD_SndFileWriter.cpp.
void AUD_SndFileWriter::write | ( | unsigned int | length, |
sample_t * | buffer | ||
) | [virtual] |
Request to write the next length samples out into the sink.
length | The count of samples to write. |
buffer | The pointer to the buffer containing the data. |
Implements AUD_IWriter.
Definition at line 134 of file AUD_SndFileWriter.cpp.
References length().