Playing a sound

#Playing a sound

import audio, appuifw

#Define the function for stopping the playback
def stop():
    global s
    s.stop()
    s.close()
    appuifw.app.exit_key_handler=stop

#Open the sound file
s=audio.Sound.open("C:\\music.mp3")

#Play it
s.play()

#This plays the file once; to play it indefinitely use s.play(KMdaRepeatForever)