Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/audio.cc1
-rw-r--r--src/audio/sources.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/audio/audio.cc b/src/audio/audio.cc
index 308667b..842395f 100644
--- a/src/audio/audio.cc
+++ b/src/audio/audio.cc
@@ -72,6 +72,7 @@ void shutdown()
void play(const char *name)
{
if (Sources::available(0)) {
+ alSourceRewind(Sources::ui());
Buffers::bind(Sources::ui(), std::string(name));
alSourcePlay(Sources::ui());
}
diff --git a/src/audio/sources.h b/src/audio/sources.h
index f3d6470..08a2a41 100644
--- a/src/audio/sources.h
+++ b/src/audio/sources.h
@@ -25,6 +25,8 @@ public:
static bool available(size_t index) { return source_available[index]; }
+ static ALuint source(size_t index) { return sources[index]; }
+
/// the sources for user interface sounds
static inline ALuint ui() { return sources[0]; }