Thrive
sound_manager.h
1 #pragma once
2 #include <memory>
3 #include <string>
4 
5 namespace Ogre {
6 
7  class SceneManager;
8 }
9 
10 namespace thrive{
11 
12 class SoundListener;
13 class SoundEmitter;
14 
15 class SoundManager final{
16 public:
17 
18  SoundManager();
19  ~SoundManager();
20 
26  void
27  init(
28  const std::string &device
29  );
30 
32  void
34  SoundEmitter* sound
35  );
36 
46  const std::string &name,
47  const std::string &fileName,
48  bool stream,
49  bool loop,
50  std::string namespacePrefix
51  );
52 
57  static SoundListener* getListener();
58 
62  static SoundManager* getSingleton();
63 
64 private:
65 
66  struct Implementation;
67  std::unique_ptr<Implementation> m_impl;
68 
71  static SoundManager* staticAccess;
72 };
73 }
static SoundManager * getSingleton()
Returns a pointer to the global instance.
Definition: sound_manager.cpp:49
Definition: sound_listener.h:17
void destroySound(SoundEmitter *sound)
Destroys a sound object that was created before with createSound.
Definition: sound_manager.cpp:143
void init(const std::string &device)
Sets up cAudio with the specified device.
Definition: sound_manager.cpp:69
Definition: sound_manager.h:15
Definition: sound_emitter.h:19
Definition: bullet_ogre_conversion.h:6
SoundEmitter * createSound(const std::string &name, const std::string &fileName, bool stream, bool loop, std::string namespacePrefix)
Creates a sound object for internal use by sound system.
Definition: sound_manager.cpp:153
Definition: debug_drawing.h:8
static SoundListener * getListener()
Returns the listener object which can be moved to change the position of the sound's listener...
Definition: sound_manager.cpp:43