Hello Eric,

The most obvious problem would be thread-related but it looks like you
already covered that aspect with InvokeOnMainThread.

The next best thing is filling a bug report [1] and include a small,
self-contained, test case to have other people look at the issue.

You may also want to look (before or simultaneously) to the
AVTouchSample sample code [2] and see how it differs from your
application.

Regards,
Sebastien

[1] http://buzgilla.xamarin.com
[2] https://github.com/xamarin/monotouch-samples/tree/master/AVTouchSample

On Tue, Nov 8, 2011 at 12:34 PM, kissgamestudios
<e...@kissgamestudios.com> wrote:
> I recently upgraded my application from 3.X to 5.X I had to make a few
> changes to the recorder to get the recording working, but I have tried
> everything I can think of to make the AudioPlayer() work and it keeps SIGDEV
> hard crashing on the simulator AND the device. This totally worked fine
> before I have reverted back to 3.X to make sure it still works and it does.
> I even put the AudioPlayer in a Singleton Globals static class to see if
> that helps and it doesnt :(
>
> The wierd thing is that if I set a breakpoint IN the Async callback from the
> WebService it will play fine.
>
> As soon as I let it continue it will SIGDEV.  ANY HELP WOULD BE GREATLY
> APPRECIATED! I also wrapping in in an InvokeOnMainThread() to see if that
> helped and nothing too :(
>
>
> What I do is call a WebService that returns a byte[].  when I get that data
> I do the following:
>
> //Store the resulting byte[] into a FileStream and save it here
>
> ......
>
> //Now lets play the file!
> Globals.AudioPlayer = new AudioPlayer();
> Globals.AudioPlayer = AVAudioPlayer.FromUrl(NSUrl.FromFilename(sfile +
> ".wav"));
> Globals.AudioPlayer.PrepareToPlay();
> Globals.AudioPlayer.MeteringEnabled = true;
> Globals.Audioplayer.FinishedPlaying += HandlePlayerFinishedPlaying;
>
>
> Globals.AudioPlayer.Play();
>
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Problem-with-AudioPlayer-on-5-x-tp4016828p4016828.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> MonoTouch@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to