Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/audio.cc2
-rw-r--r--src/client/console.cc3
-rw-r--r--src/client/input.cc3
3 files changed, 8 insertions, 0 deletions
diff --git a/src/audio/audio.cc b/src/audio/audio.cc
index 842395f..729f3d2 100644
--- a/src/audio/audio.cc
+++ b/src/audio/audio.cc
@@ -71,6 +71,8 @@ void shutdown()
void play(const char *name)
{
+ Buffers::load(std::string(name));
+
if (Sources::available(0)) {
alSourceRewind(Sources::ui());
Buffers::bind(Sources::ui(), std::string(name));
diff --git a/src/client/console.cc b/src/client/console.cc
index c5feb86..6d286a9 100644
--- a/src/client/console.cc
+++ b/src/client/console.cc
@@ -9,6 +9,7 @@
#include <cmath>
#include "auxiliary/functions.h"
+#include "audio/audio.h"
#include "client/chat.h"
#include "client/console.h"
#include "client/video.h"
@@ -93,6 +94,8 @@ void Console::toggle()
}
setkeyboardmode(console()->visible() || (core::application()->connected() && chat::visible()));
+
+ audio::play("ui/console");
}
void Console::keypressed(unsigned int key)
diff --git a/src/client/input.cc b/src/client/input.cc
index cb54e32..d3feefe 100644
--- a/src/client/input.cc
+++ b/src/client/input.cc
@@ -4,6 +4,7 @@
the terms and conditions of the GNU General Public License version 2
*/
+#include "audio/audio.h"
#include "core/core.h"
#include "client/client.h"
#include "client/input.h"
@@ -78,6 +79,7 @@ void func_ui_control(std::string const &args)
render::Camera::set_direction(0.0f);
render::Camera::set_pitch(0.0f);
}
+ audio::play("ui/control");
}
void func_ui_console(std::string const &args)
@@ -99,6 +101,7 @@ void func_ui_view(std::string const &args)
local_roll = 0;
local_pitch = 0;
local_direction = 0;
+ audio::play("ui/view");
}
}