cAudio::IDataSource Class Reference

Interface for data providers in cAudio. More...

#include <IDataSource.h>

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

List of all members.

Public Member Functions

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

Detailed Description

Interface for data providers in cAudio.

Definition at line 13 of file IDataSource.h.


Member Function Documentation

virtual bool cAudio::IDataSource::isValid (  )  [pure virtual]

Returns whether the source is valid.

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

Implemented in cAudio::cFileSource, and cAudio::cMemorySource.

virtual int cAudio::IDataSource::read ( void *  output,
int  size 
) [pure 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.

Implemented in cAudio::cFileSource, and cAudio::cMemorySource.

virtual bool cAudio::IDataSource::seek ( int  amount,
bool  relative 
) [pure 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.

Implemented in cAudio::cFileSource, and cAudio::cMemorySource.


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

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