I've had no trouble with AVAudioPlayer.FromUrl(NSUrl.FromFilename(...))
myself, but I'm still on MT 3.x, if that makes a difference. Have you
confirmed that the file is readable?

On Thu, May 12, 2011 at 1:50 PM, Justin Hansen <[email protected]> wrote:

> I had this same issue. I ended up using SystemSound but would much rather
> have used this method. Anyone have a fix for this?
>
> Justin Hansen
>
>
> On Thu, May 12, 2011 at 4:46 PM, Ken Lavigne <[email protected]> wrote:
>
>> I am having a problem using the AVMediaPlayer. I want to play an MP3 file
>> that is included as content in my project. I am using this code based on
>> an
>> example I found.
>>
>> var audioPlayer = AVAudioPlayer.FromUrl (NSUrl.FromFilename(
>> rows[indexPath.Row]));
>> audioPlayer.Play();
>> audioPlayer.FinishedPlaying += delegate { audioPlayer.Dispose (); };
>>
>> audioPlayer is never set to anything. I even tried the following
>>
>> var audioplayer = new AVAudioPlayer();
>>
>> My variable never gets initialized.
>>
>> What am I doing wrong?
>>
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://monotouch.2284126.n4.nabble.com/AVMediaPlayer-tp3518670p3518670.html
>> Sent from the MonoTouch mailing list archive at Nabble.com.
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>
>
>
> --
> Justin Hansen
> http://www.klickwerx.com
> Need some technology help? - http://www.betterfly.com/LearnTheWeb
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>


-- 
David Moles
[email protected]
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to