ClientSound Class Reference
A sound file.
More...
#include <yatecbase.h>
List of all members.
Detailed Description
A sound file.
This class holds a sound file along with an output device used to play it
Constructor & Destructor Documentation
ClientSound |
( |
const char * |
name, |
|
|
const char * |
file, |
|
|
const char * |
device = 0 | |
|
) |
| | [inline] |
Constructor
- Parameters:
-
| name | The name of this object |
| file | The file to play (should contain the whole path and the file name) |
| device | Optional device used to play the file. Set to 0 to use the default one |
Destructor. Stop playing the file
Member Function Documentation
virtual void destruct |
( |
|
) |
[inline, virtual] |
bool started |
( |
|
) |
const [inline] |
Check if this sound is started
- Returns:
- True if this sound is started
const String& file |
( |
|
) |
const [inline] |
Get the file played by this sound
- Returns:
- The file played by this sound
void file |
( |
const char * |
filename |
) |
[inline] |
Set the file played by this sound. The new file will not be used until the next time the sound is started
- Parameters:
-
| filename | The new file played by this sound |
bool start |
( |
int |
repeat = -1 , |
|
|
bool |
force = true | |
|
) |
| | |
Start playing the file
- Parameters:
-
| repeat | The number of times to play the file if positive, play until explicitely stopped otherwise |
| force | True to start playing the file even if already started |
- Returns:
- True on success
static bool started |
( |
const String & |
name |
) |
[static] |
Check if a sound is started
- Parameters:
-
| name | The name of the sound to check |
- Returns:
- True if the given sound is started
static bool start |
( |
const String & |
name, |
|
|
int |
repeat = -1 , |
|
|
bool |
force = true | |
|
) |
| | [static] |
Start playing a given sound
- Parameters:
-
| name | The name of the sound to play |
| repeat | The number of times to play the file if positive, play until explicitely stopped otherwise |
| force | True to start playing the file even if already started |
- Returns:
- True on success
static void stop |
( |
const String & |
name |
) |
[static] |
Stop playing a given sound
- Parameters:
-
| name | The name of the sound to stop |
Find a sound object
- Parameters:
-
| token | The token used to match the sound |
| byName | True to match the sound's name, false to match its file |
- Returns:
- True on success
Member Data Documentation
Mutex used to lock the sounds list operations
The documentation for this class was generated from the following file: