nAudioFile Class Reference
[Audio Subsystem]
#include <naudiofile.h>
Inheritance diagram for nAudioFile:

Detailed Description
A generic base class for read access to audio files. Derive subclass for specific file formats/codecs.(C) 2005 Radon Labs GmbH
Definition at line 20 of file naudiofile.h.
Public Member Functions | |
| nAudioFile () | |
| constructor | |
| virtual | ~nAudioFile () |
| destructor | |
| virtual bool | Open (const nString &filename) |
| open the file | |
| virtual void | Close () |
| close the file | |
| bool | IsOpen () const |
| return true if currently open | |
| virtual uint | Read (void *buffer, uint bytesToRead) |
| read bytes from file | |
| virtual bool | Reset () |
| reset to beginning of audio data | |
| virtual int | GetSize () const |
| return size of audio data in file in bytes | |
| virtual WAVEFORMATEX * | GetFormat () const |
| return pointer to format description | |
Protected Attributes | |
| bool | isOpen |
Constructor & Destructor Documentation
|
|
constructor
Definition at line 10 of file naudiofile.cc. |
|
|
destructor
Definition at line 19 of file naudiofile.cc. |
Member Function Documentation
|
|
open the file Open the file for reading. The method should open the file and read the file's header data. Reimplemented in nOggFile, and nWavFile. Definition at line 30 of file naudiofile.cc. |
|
|
close the file Close the file. Reimplemented in nOggFile, and nWavFile. Definition at line 42 of file naudiofile.cc. |
|
|
return true if currently open
Definition at line 51 of file naudiofile.h. |
|
||||||||||||
|
read bytes from file Read data from file. Returns the number of bytes actually read. If decoding happens inside Read() the number of bytes to read and number of bytes actually read means "decoded data". The method should wrap around if the end of the data is encountered. Reimplemented in nOggFile, and nWavFile. Definition at line 56 of file naudiofile.cc. |
|
|
reset to beginning of audio data Reset the object to the beginning of the audio data. Reimplemented in nOggFile, and nWavFile. Definition at line 67 of file naudiofile.cc. |
|
|
return size of audio data in file in bytes This method returns the (decoded) size of audio data in the file in bytes. Reimplemented in nOggFile, and nWavFile. Definition at line 78 of file naudiofile.cc. |
|
|
return pointer to format description This method returns a pointer to a WAVEFORMATEX structure which describes the format of the audio data in the file. Reimplemented in nOggFile, and nWavFile. Definition at line 90 of file naudiofile.cc. |
Member Data Documentation
|
|
Definition at line 43 of file naudiofile.h. |
The documentation for this class was generated from the following files: