SoundManager.h

Go to the documentation of this file.
00001 #ifndef SOUNDMANAGER_H_
00002 #define SOUNDMANAGER_H_
00003 
00004 #include "SoundPlayer.h"
00005 
00006 #include "isound.h"
00007 #include "AutoPtr.h"
00008 #include "generic/callback.h"
00009 #include "gtkutil/widget.h"
00010 
00011 namespace sound
00012 {
00016     class SoundManager: public ISoundManager
00017     {
00018             // The helper class for playing the sounds
00019             SoundPlayer _soundPlayer;
00020 
00021             // Enables or Disables playback globally for the plugin.
00022             bool playbackEnabled;
00023 
00024             // In case the plugin is disabled while playing, this
00025             // file will be resumed if reenabled.
00026             std::string resumingFileNameToBePlayed;
00027 
00028         public:
00032             SoundManager ();
00033 
00034             virtual ~SoundManager ();
00035 
00039             virtual bool playSound (const std::string& fileName);
00040 
00043             virtual void stopSound ();
00044 
00047             virtual void switchPlaybackEnabledFlag();
00048 
00051             virtual bool isPlaybackEnabled ( ){ return playbackEnabled;};
00052     };
00053 
00054     typedef AutoPtr<SoundManager> SoundManagerPtr;
00055 }
00056 
00057 bool GlobalSoundManager_isPlaybackEnabled(void);
00058 
00059 void GlobalSoundManager_switchPlaybackEnabledFlag(void);
00060 
00061 extern ToggleItem g_soundPlaybackEnabled_button;
00062 
00063 #endif /*SOUNDMANAGER_H_*/

Generated by  doxygen 1.6.2