diff options
author | Paul Gilbert | 2014-02-23 21:34:20 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-02-23 21:34:20 -0500 |
commit | 8ee283d921ec88bad61469e136a31aef0ff5b9ca (patch) | |
tree | d0f839c55947816715a513f8ab639c479fd4f930 /engines/mads/sound.h | |
parent | 8c9420a8349b0cdb93dcace36c2bd5f93e03476f (diff) | |
download | scummvm-rg350-8ee283d921ec88bad61469e136a31aef0ff5b9ca.tar.gz scummvm-rg350-8ee283d921ec88bad61469e136a31aef0ff5b9ca.tar.bz2 scummvm-rg350-8ee283d921ec88bad61469e136a31aef0ff5b9ca.zip |
MADS: Implemented sound player logic and outer game loop
Diffstat (limited to 'engines/mads/sound.h')
-rw-r--r-- | engines/mads/sound.h | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/engines/mads/sound.h b/engines/mads/sound.h index 7a9a4ef29b..51213f0e4e 100644 --- a/engines/mads/sound.h +++ b/engines/mads/sound.h @@ -24,6 +24,7 @@ #define MADS_SOUND_H #include "common/scummsys.h" +#include "common/queue.h" #include "audio/audiostream.h" #include "audio/mixer.h" #include "mads/nebular/sound_nebular.h" @@ -36,13 +37,65 @@ class SoundManager { private: MADSEngine *_vm; Audio::Mixer *_mixer; - Nebular::ASound *_asound; + Nebular::ASound *_driver; + bool _pollSoundEnabled; + bool _soundPollFlag; + bool _newSoundsPaused; + Common::Queue<int> _queuedCommands; public: SoundManager(MADSEngine *vm, Audio::Mixer *mixer); ~SoundManager(); - - void test(); - void poll(); + + /** + * Initialises the sound driver for a given game section + */ + void init(int sectionNumber); + + /** + * Stop any currently active sound and remove the driver + */ + void closeDriver(); + + /** + * Remove the driver + */ + void removeDriver(); + + /** + * Sets the enabled status of the sound + * @flag True if sound should be enabled + */ + void setEnabled(bool flag); + + /** + * Temporarily pause the playback of any new sound commands + */ + void queueNewCommands(); + + /** + * Stop queueing sound commands, and execute any previously queued ones + */ + void startQueuedCommands(); + + //@{ + /** + * Executes a command on the sound driver + * @param commandid Command Id to execute + * @param param Optional paramater specific to a few commands + */ + void command(int commandId, int param = 0); + + /** + * Stops any currently playing sound + */ + void stop(); + + /** + * Noise + * Some sort of random noise generation? + */ + void noise(); + //@} }; } // End of namespace MADS |