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:
@@ -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)
|
protected Sound (SoundGroup group, ClipBuffer buffer)
|
||||||
{
|
{
|
||||||
_group = group;
|
_group = group;
|
||||||
|
|||||||
Reference in New Issue
Block a user