The FileWriter class is able to create IWriter classes as well as write readers to them.
More...
#include <FileWriter.h>
|
static std::shared_ptr< IWriter > | createWriter (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.
|
|
The FileWriter class is able to create IWriter classes as well as write readers to them.
◆ 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
-
filename | The file to write to. |
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. |
- 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
-
reader | The reader to read from. |
writer | The writer to write to. |
length | How many samples should be transferred. |
buffersize | How 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
-
reader | The reader to read from. |
writers | The writers to write to. |
length | How many samples should be transferred. |
buffersize | How many samples should be transferred at once. |
The documentation for this class was generated from the following file: