diff options
author | Stijn Buys <ingar@osirion.org> | 2012-12-28 22:55:35 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-12-28 22:55:35 +0000 |
commit | f416e6b792e5dda143f60b7a2724db6b3ec33d75 (patch) | |
tree | 553ddcaa6c60489904a8db818eff688c0b85a437 /src/audio/sources.cc | |
parent | fe96eee5db2acbef1ea0f360b180fd9f8f990444 (diff) |
Support for rendering globes with rings,
removed hardcoded 'corona' prefix for corona textures,
added support for projectile fire sounds.
Diffstat (limited to 'src/audio/sources.cc')
-rw-r--r-- | src/audio/sources.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/audio/sources.cc b/src/audio/sources.cc index 241332b..a3d7a8f 100644 --- a/src/audio/sources.cc +++ b/src/audio/sources.cc @@ -85,4 +85,16 @@ void Sources::remove(size_t index) //con_debug << "removed source " << index << std::endl; } +bool Sources::is_playing(size_t index) +{ + + if ((index < MAXUISOURCES) || (MAXSOURCES <= index)) + return false; + + ALint srcstate = 0; + alGetSourcei(sources[index] , AL_SOURCE_STATE , &srcstate); + + return (srcstate == AL_PLAYING); +} + } |