EXPORT_CLASSclass TSampleInstance

The object used to access a currently playing instance of a TSample.

Inheritance:


Public Methods

[more] TSampleInstance()
Make an empty sample instance
[more]bool IsPlaying() const
[more]bool IsPaused() const
[more]bool IsStopped() const
[more]bool Stop( int fadeout = 0 )
Stop the instance after fading it for fadeout ms.
[more]bool StopIn( int ms )
Stop the instance after ms ms.
[more]void Pause()
Pause the instance
[more]void Resume()
Resume playing the instance if it was paused
[more]void SetVolume( int vol )
Set the volume of the instance.
[more]int GetVolume() const

Protected Methods

[more] TSampleInstance(Data* data)
Initialize a TSampleInstance with a data object


Documentation

The object used to access a currently playing instance of a TSample. It provides function to start, stop, pause, resume and fade the instance. It also provides function to query the state of the instance.
o TSampleInstance(Data* data)
Initialize a TSampleInstance with a data object

o TSampleInstance()
Make an empty sample instance

obool IsPlaying() const
Returns:
true if the instance is playing and false otherwise.

obool IsPaused() const
Returns:
true if the instance is paused and false otherwise.

obool IsStopped() const
Returns:
true if the instance is stoped and false otherwise.

obool Stop( int fadeout = 0 )
Stop the instance after fading it for fadeout ms.
Returns:
true if the channel was playing and is now stoped, false otherwise.

obool StopIn( int ms )
Stop the instance after ms ms. This may not work I think there is a bug in SDL_mixer.

Returns:
True if the channel is playing and will stop in ms ms, false otherwise.

ovoid Pause()
Pause the instance

ovoid Resume()
Resume playing the instance if it was paused

ovoid SetVolume( int vol )
Set the volume of the instance. This does not affect othe instances of the same sample.

oint GetVolume() const
Returns:
The volume of the instance.


This class has no child classes.
Friends:
class TMixer

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.