Classes Utilities Scripts Speech Search Up Home
ISIP IFC Index
Name Synopsis Quick Start Description Dependencies Public Constants Error Codes Protected Data Required Public Methods Class-specific Public Methods Private Methods Examples Notes
Manual Page Sections
Title Bar

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 provides a transparent interface to many different types of file formats including Sof, raw, and Microsoft WAV files. Manipulation of these files is hidden from the user. Standard C++ file-handling functions such as open and close are provided. In read-only mode, the type of a file is sensed automatically. Write modes allow a user to control the file type, compression format, storage precision, etc.

AudioFile inherits the
File class from the System library. Therefore, its basic file system interactions are implemented in that class. Support for the NIST Speech File Manipulation Software (SPHERE) is provided using the NIST Sphere 2.6a library. Support for Microsoft WAV files, and a variety of other types, is provided using SGI's Audio File Library.

dependencies:

public constants: error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

examples:

notes: