name: AudioFile public: File

synopsis:

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_mmedia.a

#include <AudioFile.h>

AudioFile();
long getData(Vector& data,
	     double start_time = DEF_START_TIME,
	     double duration = DEF_DURATION);
long getData(VectorFloat& data, long channel_tag,
	     double start_time = DEF_START_TIME,
	     double duration = DEF_DURATION);
long getRange(Vector& data, double start_time, double end_time);
boolean setFileType(FILE_TYPE file_type);

quick start:

AudioFile src;
src.open(L"/tmp/input.raw");

Vector <VectorFloat> data(1);
src.getData(data(0), 0, 50, 50l);

Filename output(L"/tmp/output.raw");

AudioFile dst;
dst.open(output, File::WRITE_ONLY);
dst.writeAudioData(data, 0);

description:

The AudioFile class inherits File class. Therefore, it has basic file operation, such as open, close etc. The AudioFile class is used to hold the parameters of an audio file and do basic signal processing. The file format and parameters can be specified. AudioFile can get data of the required range from file, and the range can be in term of the sample index or sample time. The data of each channel being read in are put into a CircularBuffer<Float> and filtered. Each channel data has a separate CircularBuffer, and a set of corresponding filter coefficients.

dependencies:

public constants: error codes:

protected data:

required public methods:

class-specific public methods:

private methods: examples:

notes: