A class to write SND-files (the .au format) More...
#include <itpp/srccode/audiofile.h>
Public Member Functions | |
SND_Out_File () | |
Default constructor - creates uninitialized stream. | |
SND_Out_File (const char *fname, const Audio_Stream_Description &d) | |
Constructor from file name fname and stream description d. | |
~SND_Out_File () | |
Stream destructor. | |
bool | open (const char *fname, const Audio_Stream_Description &d) |
Open the file fname with stream description d. | |
void | close () |
Close the file. | |
Audio_Stream_Description | get_description () const |
Get stream description. More... | |
bool | seek_write (std::streamoff pos) |
Set current position to write to pos (samples). More... | |
std::streamoff | tell_write () |
Get current position in samples. More... | |
std::streamoff | num_samples () const |
Get number of samples in stream. More... | |
bool | write_sample (const double &s, int ch=0) |
Write single sample s at current position to channel ch. More... | |
bool | write_channel (const vec &v, int ch=0) |
Write the vector v to channel ch starting at current position. More... | |
bool | write (const mat &m) |
Write audio channels from columns of the matrix m starting at current position. More... | |
A class to write SND-files (the .au format)
Output stream uses underlying binary stream to write audio data to the audio file in au format. Audio can be written sample-by sample, channel-wise or taken column-wise from the input matrix
Following example illustrates write operations with SND_Out_File:
Definition at line 282 of file audiofile.h.
|
inline |
Get stream description.
Definition at line 296 of file audiofile.h.
|
inline |
Set current position to write to pos (samples).
Definition at line 298 of file audiofile.h.
|
inline |
Get current position in samples.
Definition at line 309 of file audiofile.h.
|
inline |
Get number of samples in stream.
Definition at line 317 of file audiofile.h.
|
inline |
Write single sample s at current position to channel ch.
Definition at line 319 of file audiofile.h.
References itpp::max().
|
inline |
Write the vector v to channel ch starting at current position.
Definition at line 332 of file audiofile.h.
References itpp::max().
Referenced by itpp::snd_write_channel().
|
inline |
Write audio channels from columns of the matrix m starting at current position.
Definition at line 345 of file audiofile.h.
References itpp::max().
Referenced by itpp::snd_write().
Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.4