Blender V2.61 - r43446
Public Member Functions

AUD_SndFileWriter Class Reference

#include <AUD_SndFileWriter.h>

Inheritance diagram for AUD_SndFileWriter:
Inheritance graph
[legend]

List of all members.

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)

Detailed Description

This class writes a sound file via libsndfile.

Definition at line 41 of file AUD_SndFileWriter.h.


Constructor & Destructor Documentation

AUD_SndFileWriter::AUD_SndFileWriter ( std::string  filename,
AUD_DeviceSpecs  specs,
AUD_Container  format,
AUD_Codec  codec,
unsigned int  bitrate 
)

Creates a new writer.

Parameters:
filenameThe path to the file to be read.
specsThe file's audio specification.
formatThe file's container format.
codecThe codec used for encoding the audio data.
bitrateThe bitrate for encoding.
Exceptions:
AUD_ExceptionThrown 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.


Member Function Documentation

int AUD_SndFileWriter::getPosition ( ) const [virtual]

Returns how many samples have been written so far.

Returns:
The writing position as sample count. May be negative if unknown.

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.

Returns:
The AUD_DeviceSpecs structure.
Note:
Regardless of the format the input still has to be float!

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.

Parameters:
lengthThe count of samples to write.
bufferThe pointer to the buffer containing the data.

Implements AUD_IWriter.

Definition at line 134 of file AUD_SndFileWriter.cpp.

References length().


The documentation for this class was generated from the following files: