newspeoplefor developersdocumentationdownloads

nWavFile Class Reference
[Audio Subsystem]

#include <nwavfile.h>

Inheritance diagram for nWavFile:

nAudioFile List of all members.

Detailed Description

Provide read-access to a wav file.

NOTE: this is basically a cleaned-up rippoff of DSound-Framework's CWaveFile class.

(C) 2005 Radon Labs GmbH

Definition at line 17 of file nwavfile.h.


Public Member Functions

 nWavFile ()
 constructor
virtual ~nWavFile ()
 destructor
virtual bool Open (const nString &filename)
 open the file
virtual void Close ()
 close the file
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

Constructor & Destructor Documentation

nWavFile::nWavFile  ) 
 

constructor

Definition at line 115 of file nwavfile.cc.

nWavFile::~nWavFile  )  [virtual]
 

destructor

Definition at line 132 of file nwavfile.cc.


Member Function Documentation

bool nWavFile::Open const nString filename  )  [virtual]
 

open the file

Reimplemented from nAudioFile.

Definition at line 144 of file nwavfile.cc.

void nWavFile::Close  )  [virtual]
 

close the file

Reimplemented from nAudioFile.

Definition at line 184 of file nwavfile.cc.

uint nWavFile::Read void *  buffer,
uint  bytesToRead
[virtual]
 

read bytes from file

Reads section of data from a wave file into pBuffer and returns how much read in pdwSizeRead, reading not more than dwSizeToRead. This uses m_ck to determine where to start reading from. So subsequent calls will be continue where the last left off unless Reset() is called.

Reimplemented from nAudioFile.

Definition at line 343 of file nwavfile.cc.

bool nWavFile::Reset  )  [virtual]
 

reset to beginning of audio data

Resets the file pointer to the beginning of the audio data.

Reimplemented from nAudioFile.

Definition at line 315 of file nwavfile.cc.

int nWavFile::GetSize  )  const [virtual]
 

return size of audio data in file in bytes

Reimplemented from nAudioFile.

Definition at line 201 of file nwavfile.cc.

WAVEFORMATEX * nWavFile::GetFormat  )  const [virtual]
 

return pointer to format description

Reimplemented from nAudioFile.

Definition at line 211 of file nwavfile.cc.


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

Copyright © 1999-2005 by the contributing authors. Ideas, requests, problems: Send feedback.