Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-06-15 17:39:34 +0000
committerStijn Buys <ingar@osirion.org>2008-06-15 17:39:34 +0000
commitebb56ee4815325675ee878782e2ffa2f40da03d0 (patch)
tree6da7f2179aea3f526b1c3e5ac2738a8128278f2d /src/audio
parent7b07ebcb0351cef57aa2397f49ef25979fab7472 (diff)
time command, alRewindSource for ui sounds
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]; }