Pyrogenesis  trunk
ISoundManager.h
Go to the documentation of this file.
1 /* Copyright (C) 2014 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INCLUDED_ISOUNDMANAGER_H
19 #define INCLUDED_ISOUNDMANAGER_H
20 
21 #include "lib/config2.h"
22 #include "lib/file/vfs/vfs_path.h"
24 
25 class CVector3D;
26 
28 {
29 public:
30  virtual ~ISoundManager() {};
31 
32  static void CreateSoundManager();
33  static void SetEnabled(bool doEnable);
34  static void CloseGame();
35 
36  virtual void StartWorker() = 0;
37 
38  virtual void IdleTask() = 0;
39  virtual void Pause(bool pauseIt) = 0;
40 
41  virtual void SetMasterGain(float gain) = 0;
42  virtual void SetMusicGain(float gain) = 0;
43  virtual void SetAmbientGain(float gain) = 0;
44  virtual void SetActionGain(float gain) = 0;
45  virtual void SetUIGain(float gain) = 0;
46 
47  virtual void PlayAsUI(const VfsPath& itemPath, bool looping) = 0;
48  virtual void PlayAsMusic(const VfsPath& itemPath, bool looping) = 0;
49  virtual void PlayAsAmbient(const VfsPath& itemPath, bool looping) = 0;
50  virtual void PlayAsGroup(const VfsPath& groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound) = 0;
51 
52  virtual bool InDistress() = 0;
53 };
54 
56 
57 #endif // INCLUDED_ISOUNDMANAGER_H
58 
virtual void PlayAsMusic(const VfsPath &itemPath, bool looping)=0
virtual bool InDistress()=0
virtual void Pause(bool pauseIt)=0
ISoundManager * g_SoundManager
Definition: SoundManager.cpp:35
virtual void PlayAsUI(const VfsPath &itemPath, bool looping)=0
virtual void PlayAsGroup(const VfsPath &groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound)=0
virtual void IdleTask()=0
Definition: Vector3D.h:28
static void CloseGame()
Definition: SoundManager.cpp:201
virtual void SetActionGain(float gain)=0
virtual void SetMasterGain(float gain)=0
virtual void SetAmbientGain(float gain)=0
Definition: path.h:77
virtual void SetMusicGain(float gain)=0
virtual void SetUIGain(float gain)=0
Definition: ISoundManager.h:27
static void SetEnabled(bool doEnable)
Definition: SoundManager.cpp:194
virtual ~ISoundManager()
Definition: ISoundManager.h:30
static void CreateSoundManager()
Definition: SoundManager.cpp:185
virtual void StartWorker()=0
virtual void PlayAsAmbient(const VfsPath &itemPath, bool looping)=0
u32 entity_id_t
Entity ID type.
Definition: Entity.h:23