cAudio::cFileSource Class Reference

Inheritance diagram for cAudio::cFileSource:
Inheritance graph
[legend]
Collaboration diagram for cAudio::cFileSource:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 cFileSource (const char *filename)
virtual bool isValid ()
 Returns whether the source is valid.
virtual int getCurrentPos ()
 Returns the current location in the data stream.
virtual int getSize ()
 Returns the total size of the data stream.
virtual int read (void *output, int size)
 Reads out a section of the data stream.
virtual bool seek (int amount, bool relative)
 Seek to a position in the data stream.

Protected Attributes

bool Valid
 Holds if valid.
int Filesize
 Holds file size.
FILE * pFile
 File stream.

Detailed Description

Definition at line 16 of file cFileSource.h.


Member Function Documentation

bool cAudio::cFileSource::isValid (  )  [virtual]

Returns whether the source is valid.

Returns:
Returns false in case of an error, like the file couldn't be found.

Implements cAudio::IDataSource.

Definition at line 36 of file cFileSource.cpp.

int cAudio::cFileSource::read ( void *  output,
int  size 
) [virtual]

Reads out a section of the data stream.

Parameters:
output,: Pointer to a location to put the read data.
size,: Size in bytes of the data to read.
Returns:
Number of bytes actually read. 0 bytes may indicate end of file or stream.

Implements cAudio::IDataSource.

Definition at line 51 of file cFileSource.cpp.

bool cAudio::cFileSource::seek ( int  amount,
bool  relative 
) [virtual]

Seek to a position in the data stream.

Parameters:
amount,: Amount in bytes to seek to.
relative,: If true the number of bytes in amount is relative to the current position in the stream.
Returns:
True if seek was successful, false if not.

Implements cAudio::IDataSource.

Definition at line 56 of file cFileSource.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:33 2010 for cAudio by  doxygen 1.6.2