Method name for audio onCompletion table listener

I’m needing to use a table listener for the audio.play onCompletion callback, but I haven’t been able to figure out what the method name should be. I think I’ve tried the obvious choices–anyone know?

  • Stephen [import]uid: 4639 topic_id: 11758 reply_id: 311758[/import]

Sorry, that feature fell through the cracks. I’m not sure if it works. Try “soundCompletion”. You are the first to ask about it after all this time. [import]uid: 7563 topic_id: 11758 reply_id: 43139[/import]

I tried soundCompletion and it did not appear to work. I try to avoid table listeners preferring to use anonymous functions instead, but those don’t pass well in parameter lists. I’ve worked around it for now but a table listener had seemed the more logical choice. [import]uid: 4639 topic_id: 11758 reply_id: 43209[/import]

Will closures work for you?
http://blog.anscamobile.com/2011/02/using-closures-in-lua-to-avoid-global-variables-for-callbacks/
[import]uid: 7563 topic_id: 11758 reply_id: 43259[/import]

That’s basically what I ended up doing. [import]uid: 4639 topic_id: 11758 reply_id: 43377[/import]