|
Wave Arts VQE
1.00
Voice Quality Enhancement
|
AIFF file reader. More...
#include <AiffFileIO.h>
Public Member Functions | |
| AiffFileIn (long cvtBufSizeArg=2048) | |
| Create AIFF file reader. | |
| bool | Open (char *fileName) |
| Open file for reading. | |
| long | GetNumFrames () |
| Get the number of sample frames in file. | |
| int | GetNumChannels () |
| Get the number of audio channels. | |
| int | GetBitsPerSamp () |
| Get the number of bits per sample. | |
| int | GetSampSize () |
| Get the sample size in bytes. | |
| int | GetFrameSize () |
| Get the frame size in bytes. | |
| long | GetSampRate () |
| Get the sample rate. | |
| long | Tell () |
| Get current read position. | |
| long | Read (char *buf, long numBytes) |
| Read raw data. | |
| long | ReadShortFrames (short *buf, long numFrames) |
| Read 16-bit integer samples from file. | |
| long | ReadFloatFrames (float *buf, long numFrames) |
| Read 32-bit float samples from file. | |
| bool | Seek (long frameOffset, int origin) |
| Seek within samples. | |
| bool | Close () |
| Close file. | |
Protected Member Functions | |
| bool | Parse () |
| Parse the headers, return true if success. | |
| bool | CheckAudioFormat () |
| Check the audio format for compatibility, return true if success. | |
Protected Attributes | |
| int | numChannels |
| number of channels | |
| int | numBitsPerSamp |
| number of bits per sample | |
| int | sampSize |
| sample size in bytes | |
| int | frameSize |
| frame size in bytes | |
| long | sampRate |
| sampling rate | |
| long | numFrames |
| total number of sample frames in file | |
| long | curFrameIndex |
| current frame read index | |
| HAiff | hAiff |
| handle to Aiff | |
AIFF file reader.
This class implements AIFF file reading.
| AiffFileIn::AiffFileIn | ( | long | cvtBufSizeArg = 2048 | ) |
Create AIFF file reader.
| cvtBufSizeArg | internal conversion buffer size |
| bool AiffFileIn::Open | ( | char * | fileName | ) | [virtual] |
Open file for reading.
| [in] | fileName | file path to open |
Open the file. Returns true if success, false if error.
Implements AFileIn.
| long AiffFileIn::Read | ( | char * | buf, |
| long | numBytes | ||
| ) | [virtual] |
Read raw data.
| [out] | buf | Destination buffer |
| [in] | numBytes | Number of bytes to read |
This method can be used to read raw sample data from file. Multi-channel data is read in interleaved format. Returns number of bytes read. The read is restricted to the data chunk of the file. This function is called internally, and users will probably prefer one of the other reader functions.
Implements AFileIn.
| long AiffFileIn::ReadFloatFrames | ( | float * | buf, |
| long | numFrames | ||
| ) | [virtual] |
Read 32-bit float samples from file.
| [out] | buf | Destination buffer |
| [in] | numFrames | Number of frames to read |
Read samples from file and convert to 32-bit floats in native format. Multi-channel data is read in interleaved format. Returns the number of sample frames read.
Implements AFileIn.
| long AiffFileIn::ReadShortFrames | ( | short * | buf, |
| long | numFrames | ||
| ) | [virtual] |
Read 16-bit integer samples from file.
| [out] | buf | Destination buffer |
| [in] | numFrames | Number of frames to read |
Read samples from file and convert to 16-bit integers in native format. Multi-channel data is read in interleaved format. Returns the number of sample frames read.
Implements AFileIn.
| bool AiffFileIn::Seek | ( | long | frameOffset, |
| int | origin | ||
| ) | [virtual] |
Seek within samples.
| [in] | frameOffset | Sample frame offset |
| [in] | origin | seek origin (same as fseek) |
Seek to sample frame offset within the data chunk of file. Returns true if success, false if error.
Implements AFileIn.
1.7.5.1