Audaspace 1.5.0
A high level audio library.
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
FileWriter Class Reference

The FileWriter class is able to create IWriter classes as well as write readers to them. More...

#include <FileWriter.h>

Static Public Member Functions

static std::shared_ptr< IWritercreateWriter (const std::string &filename, DeviceSpecs specs, Container format, Codec codec, unsigned int bitrate)
 Creates a new IWriter.
 
static void writeReader (std::shared_ptr< IReader > reader, std::shared_ptr< IWriter > writer, unsigned int length, unsigned int buffersize, void(*callback)(float, void *)=nullptr, void *data=nullptr)
 Writes a reader to a writer.
 
static void writeReader (std::shared_ptr< IReader > reader, std::vector< std::shared_ptr< IWriter > > &writers, unsigned int length, unsigned int buffersize, void(*callback)(float, void *)=nullptr, void *data=nullptr)
 Writes a reader to several writers.
 

Detailed Description

The FileWriter class is able to create IWriter classes as well as write readers to them.

Member Function Documentation

◆ createWriter()

static std::shared_ptr< IWriter > FileWriter::createWriter ( const std::string & filename,
DeviceSpecs specs,
Container format,
Codec codec,
unsigned int bitrate )
static

Creates a new IWriter.

Parameters
filenameThe file to write to.
specsThe file's audio specification.
formatThe file's container format.
codecThe codec used for encoding the audio data.
bitrateThe bitrate for encoding.
Returns
The writer to write data to.

◆ writeReader() [1/2]

static void FileWriter::writeReader ( std::shared_ptr< IReader > reader,
std::shared_ptr< IWriter > writer,
unsigned int length,
unsigned int buffersize,
void(*)(float, void *) callback = nullptr,
void * data = nullptr )
static

Writes a reader to a writer.

Parameters
readerThe reader to read from.
writerThe writer to write to.
lengthHow many samples should be transferred.
buffersizeHow many samples should be transferred at once.

◆ writeReader() [2/2]

static void FileWriter::writeReader ( std::shared_ptr< IReader > reader,
std::vector< std::shared_ptr< IWriter > > & writers,
unsigned int length,
unsigned int buffersize,
void(*)(float, void *) callback = nullptr,
void * data = nullptr )
static

Writes a reader to several writers.

Parameters
readerThe reader to read from.
writersThe writers to write to.
lengthHow many samples should be transferred.
buffersizeHow many samples should be transferred at once.

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