Class to read audio data from au file. More...
|Default constructor - creates uninitialized stream. |
|SND_In_File (const char *fname)|
|Constructor from file name fname. |
|Stream destructor. |
|bool||open (const char *fname)|
|Open the file fname. |
|Close the file. |
|Audio_Stream_Description||get_description () const|
|Get stream description. |
|bool||seek_read (std::streamoff pos)|
|Go to sample number pos. |
|Get current position in samples. |
|std::streamoff||num_samples () const|
|Get number of samples in stream. |
|bool||read_sample (double &s, int ch=0)|
|Read single sample s at current position to channel ch. |
|vec||read_channel (int n, int ch=0)|
|Read n samples from channel ch starting at current position. |
|mat||read (int n)|
|Read n samples from all channels starting at current position into matrix. |
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