Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

it is possible to use Python to signal when an mp3 file, or other audio file, has finished playing/reached their end? I know how to play them, as per the BGE code below, but don't how do I check if the are finished?

sound = aud.Factory('audio.mp3') #loads mp3 or wav file  
if not 'play' in ow: #will play sound only once 
     ow['device'] = aud.device() 
     ow['play'] = 1

Thanks in advance!

share|improve this question

There's a status property: aud.Handle.status

You could check it in regular intervals until the status changes to AUD_STATUS_STOPPED or AUD_STATUS_INVALID, see the API docs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.