tags:

views:

79

answers:

0

In objective C is a method called AudioServicesAddSystemSoundCompletion which allows to add a handler for "audio done notification". So I add the handler call AudioServicesPlaySystemSound and when the sound finished I'll get a notification. monotouch has MonoTouch.AudioToolbox.SystemSound.PlaySystemSound to play such a sound. But how do I know when the playing finished?

Situiation: I have a class which get's some information. When this information indicates an error I play a sound. If I'm already palying a sound I should do nothing.

And depending on a setting ("repeat alert") I should play the sound again the replay finished and the alert is still valid.

Sounds not so complicated - but without knowing when the sound finished playing I have a problem. So I can neither detect that I already play - nor can I repeat if needed.