English 中文(简体)
montouch detect when sound finished playing
原标题:

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.

问题回答

This isn t bound in MonoTouch yet, you should file an enhancement request at http://monotouch.net/Support so we can expose it properly.





相关问题
Write to a File in Monotouch

How would I create and write to a file in a Monotouch iPhone app? The file should persist between application launches, so I guess it has to be placed somewhere in the App bundle ( documents or ...

MonoTouch debugger never connects to app

I have an issue where the MonoDevelop debugger refuses to connect to the simulator. MonoDevelop pops a box saying "Waiting for debugger to connect on 127.0.0.1:10000..." but never connects. I have ...

montouch detect when sound finished playing

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 ...

Web Services Build Error in Monotouch

My project and web services work fine in the simulator but crash when uploading to an iPhone. It had been working fine before I updated Monotouch from 1.1. Can I revert back to earlier versions of ...

Playing a Sound With Monotouch

No matter what I try (build -> content, NSUrl, filename) I get a null exception : file not found when I try to play a .caf sound file in monotouch. //var path = NSBundle.MainBundle.PathForResource("...

Is MonoDevelop s editor slow for you?

I m using the evaluation version of MonoTouch and MonoDevelop to check out writing iPhone app in C#. However, MonoDevelop s editor is very slow for me. I mean really really slow. I have to type and ...

C# Class Definition

In XCode and objective c, if I want to use a UIGlassButton in interface builder, I put the following line in my header file: @class UIGlassButton; I am now using monotouch c#. Is there a similar ...

热门标签