OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Sound.h
Go to the documentation of this file.
1 
8 #ifndef _SOUND_H_
9 #define _SOUND_H_
10 
11 class Sound {
12  public:
13  static int initialize();
14  static void shutdown();
15  static void clear();
16 
17  static int numBuffers();
18  static int loadBuffer(unsigned char* buffer, unsigned int length);
19 
20  static int numSources(bool atListener = false);
21  static int addSource(int buffer, float volume = 1.0f, bool atListener = false, bool loop = false);
22 
23  static int sourceAt(int source, glm::vec3 pos);
24  static void listenAt(glm::vec3 pos, glm::vec3 at, glm::vec3 up);
25 
26  static void play(int source, bool atListener = false);
27  static void stop(int source);
28  static void stopAll();
29 
30  static void setEnabled(bool on = true);
31  static bool getEnabled();
32 
33  static void setVolume(float vol = 1.0f);
34  static float getVolume();
35 };
36 
37 #endif
38 
static int initialize()
Definition: Sound.cpp:15
static float getVolume()
Definition: Sound.cpp:119
Definition: Sound.h:11
static void listenAt(glm::vec3 pos, glm::vec3 at, glm::vec3 up)
Definition: Sound.cpp:75
static void stop(int source)
Definition: Sound.cpp:87
static void shutdown()
Definition: Sound.cpp:23
static int numBuffers()
Definition: Sound.cpp:35
static int sourceAt(int source, glm::vec3 pos)
Definition: Sound.cpp:67
static void setEnabled(bool on=true)
Definition: Sound.cpp:99
static int loadBuffer(unsigned char *buffer, unsigned int length)
Definition: Sound.cpp:43
static int addSource(int buffer, float volume=1.0f, bool atListener=false, bool loop=false)
Definition: Sound.cpp:59
static bool getEnabled()
Definition: Sound.cpp:105
static void setVolume(float vol=1.0f)
Definition: Sound.cpp:113
static void stopAll()
Definition: Sound.cpp:93
static int numSources(bool atListener=false)
Definition: Sound.cpp:51
static void clear()
Definition: Sound.cpp:29
static void play(int source, bool atListener=false)
Definition: Sound.cpp:81