ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!! More...
#include <audiofile.h>
Public Types | |
enum | data_encoding { enc_unknown = 0, enc_mulaw8 = 1, enc_alaw8 = 27, enc_linear8 = 2, enc_linear16 = 3, enc_linear24 = 4, enc_linear32 = 5, enc_float = 6, enc_double = 7 } |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
Public Member Functions | |
SND_IO_File () | |
Constructor. | |
SND_IO_File (const char *fname) | |
Open the file {fname}. | |
virtual | ~SND_IO_File () |
Destructor. | |
virtual bool | open (const char *fname) |
Open the file {fname}. | |
virtual void | close () |
Close the file. | |
bool | seek_read (int pos) |
Go to sample number {pos}. | |
int | tell_read () |
Return the current sample position in the file. | |
virtual bool | read (vec &v) |
Read the whole file into the vector {v}. | |
virtual bool | read (vec &v, int n) |
Read {n} samples into the vector {v}. | |
bool | good () |
Returns true if everything is OK. | |
data_encoding | encoding () const |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
int | channels () const |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
int | samples () const |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
int | rate () const |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
void | set_rate (int r) |
ACTION: ADD DOCUMENTATION FOR THIS MEMBER!!!!!!!!!!! | |
bool | open (const char *fname, int rate=8000, data_encoding e=enc_linear16) |
Open the file {fname}. | |
bool | seek_write (int pos) |
Go to sample number {pos}. | |
int | tell_write () |
Return the current sample position in the file. | |
virtual bool | write (const vec &v) |
Write the vector {v}. | |
Protected Member Functions | |
int | sample_size () const |
ACTION: Add documentation for this protected member. | |
bool | read_header (std::istream &f) |
ACTION: Add documentation for this protected member. | |
bool | write_header (std::ostream &f) |
ACTION: Add documentation for this protected member. | |
Protected Attributes | |
std::fstream | file |
ACTION: Add documentation for this protected member. | |
bool | is_valid |
ACTION: Add documentation for this protected member. | |
struct { | |
unsigned magic | |
Magic number. | |
unsigned hdr_size | |
Size of this header. | |
unsigned data_size | |
Length of data (optional). | |
unsigned encoding | |
Data encoding format. | |
unsigned sample_rate | |
Samples per second. | |
unsigned channels | |
Number of interleaved channels. | |
char info [SND_INFO_LEN] | |
Info string. | |
} | header |
Definition of the header structure. |
ACTION: ADD DETAILED DOCUMENTATION FOR THIS CLASS!!!!!!!!!!!