Class to read audio data from au file. More...
#include <itpp/srccode/audiofile.h>
Public Member Functions | |
SND_In_File () | |
Default constructor - creates uninitialized stream. | |
SND_In_File (const char *fname) | |
Constructor from file name fname. | |
~SND_In_File () | |
Stream destructor. | |
bool | open (const char *fname) |
Open the file fname. | |
void | close () |
Close the file. | |
Audio_Stream_Description | get_description () const |
Get stream description. More... | |
bool | seek_read (std::streamoff pos) |
Go to sample number pos. More... | |
std::streamoff | tell_read () |
Get current position in samples. More... | |
std::streamoff | num_samples () const |
Get number of samples in stream. More... | |
bool | read_sample (double &s, int ch=0) |
Read single sample s at current position to channel ch. More... | |
vec | read_channel (int n, int ch=0) |
Read n samples from channel ch starting at current position. More... | |
mat | read (int n) |
Read n samples from all channels starting at current position into matrix. More... | |
Class to read audio data from au file.
Input stream of audio samples uses binary stream to get encoded audio data from snd audio file. Audio can be read as single sample from current read position in audio stream, as a vector of samples containing data from single audio channel or as matrix with audio channels stored columnwise.
Following example illustratates read operations with SND_In_File
Definition at line 176 of file audiofile.h.
|
inline |
Get stream description.
Definition at line 190 of file audiofile.h.
|
inline |
Go to sample number pos.
Definition at line 192 of file audiofile.h.
Referenced by itpp::snd_read(), and itpp::snd_read_channel().
|
inline |
Get current position in samples.
Definition at line 203 of file audiofile.h.
|
inline |
Get number of samples in stream.
Definition at line 211 of file audiofile.h.
Referenced by itpp::snd_read(), and itpp::snd_read_channel().
|
inline |
Read single sample s at current position to channel ch.
Definition at line 213 of file audiofile.h.
|
inline |
Read n samples from channel ch starting at current position.
Definition at line 221 of file audiofile.h.
Referenced by itpp::snd_read_channel().
|
inline |
Read n samples from all channels starting at current position into matrix.
Definition at line 229 of file audiofile.h.
Referenced by itpp::snd_read().
Generated on Sun Jun 5 2022 21:26:42 for IT++ by Doxygen 1.9.3