EMIPLIB
Public Member Functions

MIPWAVReader Class Reference

This is a simple WAV file reader. More...

#include <mipwavreader.h>

Inheritance diagram for MIPWAVReader:
Inheritance graph
[legend]
Collaboration diagram for MIPWAVReader:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool open (const std::string &fileName)
 Opens the WAV file specified in fileName.
int getSamplingRate () const
 Returns the sampling rate.
int getNumberOfChannels () const
 Returns the number of channels.
int64_t getNumberOfFrames () const
 Returns the number of frames in the file.
bool readFrames (float *pBuffer, int numFrames, int *numFramesRead)
 Read a number of frames.
bool readFrames (int16_t *pBuffer, int numFrames, int *numFramesRead)
 Read a number of frames.
bool rewind ()
 This function resets the state of the file as if it was just opened.
bool close ()
 Closes the file.

Detailed Description


Member Function Documentation

bool MIPWAVReader::close ( )
int MIPWAVReader::getNumberOfChannels ( ) const [inline]
int64_t MIPWAVReader::getNumberOfFrames ( ) const [inline]
int MIPWAVReader::getSamplingRate ( ) const [inline]
bool MIPWAVReader::open ( const std::string &  fileName)
bool MIPWAVReader::readFrames ( float *  pBuffer,
int  numFrames,
int *  numFramesRead 
)

Using this function, a number of frames can be read from a file.

Parameters:
pBufferBuffer in which the read frames will be stored.
numFramesThe number of frames to read.
numFramesReadUsed to store the actual number of frames read.
bool MIPWAVReader::readFrames ( int16_t *  pBuffer,
int  numFrames,
int *  numFramesRead 
)

Using this function, a number of frames can be read from a file.

Parameters:
pBufferBuffer in which the read frames will be stored.
numFramesThe number of frames to read.
numFramesReadUsed to store the actual number of frames read.
bool MIPWAVReader::rewind ( )

The documentation for this class was generated from the following file: