diff options
author | Stijn Buys <ingar@osirion.org> | 2008-06-15 17:39:34 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-06-15 17:39:34 +0000 |
commit | ebb56ee4815325675ee878782e2ffa2f40da03d0 (patch) | |
tree | 6da7f2179aea3f526b1c3e5ac2738a8128278f2d /src/audio | |
parent | 7b07ebcb0351cef57aa2397f49ef25979fab7472 (diff) |
time command, alRewindSource for ui sounds
Diffstat (limited to 'src/audio')
-rw-r--r-- | src/audio/audio.cc | 1 | ||||
-rw-r--r-- | src/audio/sources.h | 2 |
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]; } |