I am working with the AudioClip class. It has methods for playing, stopping and looping an audio file (.wav/.au). Is there a way I can check when an audio file has completed playing? The stop() method is void. Is there any other class I can use?

Thank you!

There is no method in the AudioClip class itself to return this value (as I'm sure you've already figured out). If you're looping the sound, what I would do is declare a boolean variable and change it when you start or stop the loop. For example:

boolean isPlaying = false;
isPlaying = true;

// Some more code

isPlaying = false;


Thank you! That was helpful.