Added the ability to check if a sound is currently playing.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@66 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mark Johnson
2006-10-27 18:33:24 +00:00
parent db91a42b05
commit 61b8e6792a
@@ -173,6 +173,15 @@ public class Sound
}
}
/**
* Called to check if this sound is currently playing.
*/
public boolean isPlaying ()
{
return (_sourceId != -1 && AL10.AL_PLAYING ==
AL10.alGetSourcei(_sourceId, AL10.AL_SOURCE_STATE));
}
protected Sound (SoundGroup group, ClipBuffer buffer)
{
_group = group;