CrystalSpace

Public API Reference

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

iSoundHandle Struct Reference

The sound handle is a sound in the state that is needed by the sound renderer. More...

#include <isound/handle.h>

Inheritance diagram for iSoundHandle:

iBase List of all members.

Public Member Functions

virtual bool IsStatic ()=0
 is this a static or streamed handle?
virtual csPtr< iSoundSourcePlay (bool Loop=false)=0
 play an instance of this sound For Loop == true it returns a iSoundSource you have to Stop () if you want to get rid of the looping sound (also if you want to unload your SoundRenderer) If Loop is false 0 is returned
virtual csPtr< iSoundSourceCreateSource (int Mode3d)=0
 create a sound source
virtual void StartStream (bool Loop)=0
 Start playing the stream (only for streamed sound).
virtual void StopStream ()=0
 Stop playing the stream (only for streamed sound).
virtual void ResetStream ()=0
 Reset the stream to the beginning (only for streamed sound).

Detailed Description

The sound handle is a sound in the state that is needed by the sound renderer.

It can be used to create instances of the sound, the sound sources (the Play() method is only a convenience method to create and play a sound source).

Sounds can be either static or streamed, depending on the sound data the handle is created from. There is a basic difference between these two modes how they are used: You can create any number of totally independent sound sources from a static sound, but not from a streamed sound. All sources that are created from the same streamed sound *always* play the same sequence of samples, if they play sound at all. So the Play() and Stop() methods of a streamed sound source only set the source to active or quiet mode, but they don't control the position that is currently played. Instead this position is controlled with the sound handle interface.

Definition at line 44 of file handle.h.


Member Function Documentation

virtual csPtr<iSoundSource> iSoundHandle::CreateSource int  Mode3d  )  [pure virtual]
 

create a sound source

virtual bool iSoundHandle::IsStatic  )  [pure virtual]
 

is this a static or streamed handle?

virtual csPtr<iSoundSource> iSoundHandle::Play bool  Loop = false  )  [pure virtual]
 

play an instance of this sound For Loop == true it returns a iSoundSource you have to Stop () if you want to get rid of the looping sound (also if you want to unload your SoundRenderer) If Loop is false 0 is returned

virtual void iSoundHandle::ResetStream  )  [pure virtual]
 

Reset the stream to the beginning (only for streamed sound).

virtual void iSoundHandle::StartStream bool  Loop  )  [pure virtual]
 

Start playing the stream (only for streamed sound).

virtual void iSoundHandle::StopStream  )  [pure virtual]
 

Stop playing the stream (only for streamed sound).


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