From f416e6b792e5dda143f60b7a2724db6b3ec33d75 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 28 Dec 2012 22:55:35 +0000 Subject: Support for rendering globes with rings, removed hardcoded 'corona' prefix for corona textures, added support for projectile fire sounds. --- src/audio/sources.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/audio/sources.cc') 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); +} + } -- cgit v1.2.3