Tweaks to doxygen comments.
This commit is contained in:
parent
fc692cb540
commit
4c731de8b7
@ -20,6 +20,12 @@
|
|||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file sound.hxx
|
||||||
|
* Provides a class to manage a single sound event including things
|
||||||
|
* like looping, volume and pitch changes.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _SG_SOUND_HXX
|
#ifndef _SG_SOUND_HXX
|
||||||
#define _SG_SOUND_HXX 1
|
#define _SG_SOUND_HXX 1
|
||||||
|
|
||||||
|
@ -23,6 +23,12 @@
|
|||||||
//
|
//
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file soundmgr.hxx
|
||||||
|
* Provides a sound manager class to keep track of
|
||||||
|
* multiple sounds and manage playing them with different effects and
|
||||||
|
* timings.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef _SG_SOUNDMGR_HXX
|
#ifndef _SG_SOUNDMGR_HXX
|
||||||
#define _SG_SOUNDMGR_HXX 1
|
#define _SG_SOUNDMGR_HXX 1
|
||||||
@ -44,7 +50,9 @@ SG_USING_STD(map);
|
|||||||
SG_USING_STD(string);
|
SG_USING_STD(string);
|
||||||
|
|
||||||
|
|
||||||
// manages everything we need to know for an individual sound sample
|
/**
|
||||||
|
* manages everything we need to know for an individual sound sample
|
||||||
|
*/
|
||||||
class SGSimpleSound {
|
class SGSimpleSound {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -101,6 +109,9 @@ typedef sound_map::iterator sound_map_iterator;
|
|||||||
typedef sound_map::const_iterator const_sound_map_iterator;
|
typedef sound_map::const_iterator const_sound_map_iterator;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage a collection of SGSimpleSound instances
|
||||||
|
*/
|
||||||
class SGSoundMgr
|
class SGSoundMgr
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -154,43 +165,67 @@ public:
|
|||||||
void resume ();
|
void resume ();
|
||||||
|
|
||||||
|
|
||||||
// is audio working?
|
/**
|
||||||
|
* is audio working?
|
||||||
|
*/
|
||||||
inline bool is_working() const { return !audio_sched->notWorking(); }
|
inline bool is_working() const { return !audio_sched->notWorking(); }
|
||||||
|
|
||||||
// reinitialize the sound manager
|
/**
|
||||||
|
* reinitialize the sound manager
|
||||||
|
*/
|
||||||
inline void reinit() { init(); }
|
inline void reinit() { init(); }
|
||||||
|
|
||||||
// add a sound effect, return true if successful
|
/**
|
||||||
|
* add a sound effect, return true if successful
|
||||||
|
*/
|
||||||
bool add( SGSimpleSound *sound, const string& refname);
|
bool add( SGSimpleSound *sound, const string& refname);
|
||||||
|
|
||||||
// add a sound file, return the sample if successful, else return NULL
|
/**
|
||||||
|
* add a sound file, return the sample if successful, else return NULL
|
||||||
|
*/
|
||||||
SGSimpleSound *add( const string& refname,
|
SGSimpleSound *add( const string& refname,
|
||||||
const char *path, const char *file = NULL );
|
const char *path, const char *file = NULL );
|
||||||
|
|
||||||
// remove a sound effect, return true if successful
|
/**
|
||||||
|
* remove a sound effect, return true if successful
|
||||||
|
*/
|
||||||
bool remove( const string& refname );
|
bool remove( const string& refname );
|
||||||
|
|
||||||
// return true of the specified sound exists in the sound manager system
|
/**
|
||||||
|
* return true of the specified sound exists in the sound manager system
|
||||||
|
*/
|
||||||
bool exists( const string& refname );
|
bool exists( const string& refname );
|
||||||
|
|
||||||
// return a pointer to the SGSimpleSound if the specified sound
|
/**
|
||||||
// exists in the sound manager system, otherwise return NULL
|
* return a pointer to the SGSimpleSound if the specified sound
|
||||||
SGSimpleSound *find( const string& refname );
|
* exists in the sound manager system, otherwise return NULL
|
||||||
|
*/
|
||||||
|
SGSimpleSound *find( const string& refname );
|
||||||
|
|
||||||
// tell the scheduler to play the indexed sample in a continuous
|
/**
|
||||||
// loop
|
* tell the scheduler to play the indexed sample in a continuous
|
||||||
|
* loop
|
||||||
|
*/
|
||||||
bool play_looped( const string& refname );
|
bool play_looped( const string& refname );
|
||||||
|
|
||||||
// tell the scheduler to play the indexed sample once
|
/**
|
||||||
|
* tell the scheduler to play the indexed sample once
|
||||||
|
*/
|
||||||
bool play_once( const string& refname );
|
bool play_once( const string& refname );
|
||||||
|
|
||||||
// return true of the specified sound is currently being played
|
/**
|
||||||
|
* return true of the specified sound is currently being played
|
||||||
|
*/
|
||||||
bool is_playing( const string& refname );
|
bool is_playing( const string& refname );
|
||||||
|
|
||||||
// immediate stop playing the sound
|
/**
|
||||||
|
* immediate stop playing the sound
|
||||||
|
*/
|
||||||
bool stop( const string& refname );
|
bool stop( const string& refname );
|
||||||
|
|
||||||
// return the audio scheduler
|
/**
|
||||||
|
* return the audio scheduler
|
||||||
|
*/
|
||||||
inline slScheduler *get_scheduler( ) { return audio_sched; };
|
inline slScheduler *get_scheduler( ) { return audio_sched; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user