CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iSoundData Struct Reference

The sound data is a template used to play sounds. More...

#include <isound/data.h>

Inheritance diagram for iSoundData:

iBase csSoundDataRaw List of all members.

Public Member Functions

virtual const csSoundFormatGetFormat ()=0
 Get the format of the sound data.
virtual void * GetStaticData ()=0
 Get a pointer to the data buffer (static sounds only).
virtual long GetStaticSampleCount ()=0
 Get size of this sound in samples (static sounds only).
virtual bool Initialize (const csSoundFormat *fmt)=0
 Prepare the sound for output using the given format.
virtual bool IsStatic ()=0
 Return true if this is a static sound, false if it is streamed.
virtual void * ReadStreamed (long &NumSamples)=0
 Read a data buffer from the sound (streamed sounds only).
virtual void ResetStreamed ()=0
 Reset the sound to the beginning (streamed sounds only).

Detailed Description

The sound data is a template used to play sounds.

It represents a sound file just after it was loaded. To play the sound, you must first prepare it and obtain a sound handle.

Definition at line 45 of file data.h.


Member Function Documentation

virtual const csSoundFormat* iSoundData::GetFormat  )  [pure virtual]
 

Get the format of the sound data.

Implemented in csSoundDataRaw.

virtual void* iSoundData::GetStaticData  )  [pure virtual]
 

Get a pointer to the data buffer (static sounds only).

Implemented in csSoundDataRaw.

virtual long iSoundData::GetStaticSampleCount  )  [pure virtual]
 

Get size of this sound in samples (static sounds only).

Implemented in csSoundDataRaw.

virtual bool iSoundData::Initialize const csSoundFormat fmt  )  [pure virtual]
 

Prepare the sound for output using the given format.

Implemented in csSoundDataRaw.

virtual bool iSoundData::IsStatic  )  [pure virtual]
 

Return true if this is a static sound, false if it is streamed.

Implemented in csSoundDataRaw.

virtual void* iSoundData::ReadStreamed long &  NumSamples  )  [pure virtual]
 

Read a data buffer from the sound (streamed sounds only).

The NumSamples parameter is modified to a smaller value if not all samples could be read (i.e. the stream is finished). The returned buffer is valid until the next call to Read().

Implemented in csSoundDataRaw.

virtual void iSoundData::ResetStreamed  )  [pure virtual]
 

Reset the sound to the beginning (streamed sounds only).

Implemented in csSoundDataRaw.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.4.4