cAudio  2.3.0
3d Audio Engine
 All Classes Namespaces Functions Variables Enumerations Pages
Public Member Functions | List of all members
cAudio::IDataSource Class Referenceabstract

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]

Public Member Functions

virtual bool isValid ()=0
 Returns whether the source is valid. More...
 
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. More...
 
virtual bool seek (int amount, bool relative)=0
 Seek to a position in the data stream. More...
 
- Public Member Functions inherited from cAudio::IRefCounted
virtual void grab ()
 Increments the reference count by one.
 
virtual bool drop ()
 Decrements the reference count by one. If it hits zero, this object is deleted.
 
int getReferenceCount () const
 Returns the current reference count of this object.
 

Additional Inherited Members

- Protected Attributes inherited from cAudio::IRefCounted
int RefCount
 

Detailed Description

Interface for data providers in cAudio.

Definition at line 12 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::cMemorySource.

Here is the caller graph for this function:

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::cMemorySource.

Here is the caller graph for this function:

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::cMemorySource.

Here is the caller graph for this function:


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