|
ape
0.5.0
Audio Programming Environment
|
Provides capability to record streamed audio asynchronously to a file on disk. More...
#include <outputfile.h>
Public Types | |
| enum | BitDepth { BitDepth::Int8 = 8, BitDepth::Int16 = 16, BitDepth::Int24 = 24, BitDepth::Float32 = 32 } |
| For non-compressed formats supporting it, provides a choice of bitdepths More... | |
Public Member Functions | |
| OutputAudioFile () | |
| Default-initialize an output file. More... | |
| OutputAudioFile (const char *whereWithExtension, int numChannels, double sampleRate, BitDepth bitsPerSample=BitDepth::Int24, float quality=1) | |
| Create an output file ready to be streamed. More... | |
| OutputAudioFile (const char *whereWithExtension, const IOConfig &cfg, BitDepth bitsPerSample=BitDepth::Int24, float quality=1) | |
| Create an output file ready to be streamed. More... | |
| OutputAudioFile (OutputAudioFile &&other) | |
| Move and take ownership of the other file More... | |
| OutputAudioFile & | operator= (OutputAudioFile &&other) |
| Move-assign and take ownership of the other file More... | |
| void | write (const umatrix< const float > &matrix) |
| Stream the matrix to the file. More... | |
| template<typename Container > | |
| auto | write (const Container &c) -> decltype(c.size(), c.data(), void()) |
| Stream a container supporting .size() and .data() More... | |
| void | write (std::size_t numSamples, const float *data) |
| Stream a flat buffer. More... | |
| void | write (std::size_t numSamples, const float *const *data) |
| Stream a flat rectangular buffer More... | |
| ~OutputAudioFile () | |
| Close this file, if it hasn't been moved or properly initialized More... | |
Provides capability to record streamed audio asynchronously to a file on disk.
|
strong |
|
inline |
Default-initialize an output file.
|
inline |
Create an output file ready to be streamed.
| whereWithExtension | Relative to your script's location. If the file already exists, it will be renamed with a numbered suffix (up to 1000) |
Supported extensions depend on platform, but following are always supported:
Depending on platform, these may be available:
| numChannels | How many channels in the recorded audio file |
| sampleRate | The sample rate of the recorded file. |
| bitsPerSample | Choice of bitdepth in the recorded file. |
| quality | For compressed formats, indicates a quality between 0 (worst) and 1 (best). |
|
inline |
Create an output file ready to be streamed.
| whereWithExtension | Relative to your script's location. If the file already exists, it will be renamed with a numbered suffix (up to 1000) |
Supported extensions depend on platform, but following are always supported:
Depending on platform, these may be available:
| cfg | Use IOConfig::sampleRate and IOConfig::outputs for channels |
| bitsPerSample | Choice of bitdepth in the recorded file. |
| quality | For compressed formats, indicates a quality between 0 (worst) and 1 (best). |
|
inline |
Move and take ownership of the other file
|
inline |
Close this file, if it hasn't been moved or properly initialized
|
inline |
Move-assign and take ownership of the other file
|
inline |
Stream a container supporting .size() and .data()
The container is assumed to only have one channel.
|
inline |
Stream the matrix to the file.
|
inline |
Stream a flat rectangular buffer
Assumed to have as many channels as this file was initialized with.
|
inline |
Stream a flat buffer.
Data is assumed to only have one channel.
1.8.16