Esempio n. 1
0
		public override void FinishedPlaying (AVAudioPlayer player, bool flag)
		{
			if (cbFinishedPlaying != null)
				cbFinishedPlaying (player, new AVStatusEventArgs (flag));
			if (player.Handle == IntPtr.Zero)
				throw new ObjectDisposedException ("player", "the player object was Dispose()d during the callback, this has corrupted the state of the program");
		}
Esempio n. 2
0
 public override void BeginInterruption(AVAudioPlayer player)
 {
     if (cbBeginInterruption != null)
     {
         cbBeginInterruption(player, EventArgs.Empty);
     }
 }
Esempio n. 3
0
 public override void DecoderError(AVAudioPlayer player, NSError error)
 {
     if (cbDecoderError != null)
     {
         cbDecoderError(player, new AVErrorEventArgs(error));
     }
 }
Esempio n. 4
0
 public override void FinishedPlaying(AVAudioPlayer player, bool flag)
 {
     if (cbFinishedPlaying != null)
     {
         cbFinishedPlaying(player, new AVStatusEventArgs(flag));
     }
     if (player.Handle == IntPtr.Zero)
     {
         throw new ObjectDisposedException("player", "the player object was Dispose()d during the callback, this has corrupted the state of the program");
     }
 }
Esempio n. 5
0
        public static AVAudioPlayer FromData(NSData data)
        {
            unsafe {
                var ap = new AVAudioPlayer(data, IntPtr.Zero);
                if (ap.Handle == IntPtr.Zero)
                {
                    return(null);
                }

                return(ap);
            }
        }
Esempio n. 6
0
        public static AVAudioPlayer FromUrl(NSUrl url)
        {
            unsafe {
                var ap = new AVAudioPlayer(url, IntPtr.Zero);
                if (ap.Handle == IntPtr.Zero)
                {
                    return(null);
                }

                return(ap);
            }
        }
Esempio n. 7
0
        public static AVAudioPlayer FromUrl(NSUrl url, out NSError error)
        {
            unsafe {
                IntPtr errhandle;
                IntPtr ptrtohandle = (IntPtr)(&errhandle);

                var ap = new AVAudioPlayer(url, ptrtohandle);
                if (ap.Handle == IntPtr.Zero)
                {
                    error = (NSError)Runtime.GetNSObject(errhandle);
                    return(null);
                }
                else
                {
                    error = null;
                }
                return(ap);
            }
        }
Esempio n. 8
0
		public override void EndInterruption (AVAudioPlayer player)
		{
			if (cbEndInterruption != null)
				cbEndInterruption (player, EventArgs.Empty);
		}
Esempio n. 9
0
		public override void DecoderError (AVAudioPlayer player, NSError  error)
		{
			if (cbDecoderError != null)
				cbDecoderError (player, new AVErrorEventArgs (error));
		}
Esempio n. 10
0
        public static AVAudioPlayer FromUrl(NSUrl url)
        {
            unsafe {
                var ap = new AVAudioPlayer (url, IntPtr.Zero);
                if (ap.Handle == IntPtr.Zero)
                    return null;

                return ap;
            }
        }
Esempio n. 11
0
        public static AVAudioPlayer FromUrl(NSUrl url, out NSError error)
        {
            unsafe {
                IntPtr errhandle;
                IntPtr ptrtohandle = (IntPtr) (&errhandle);

                var ap = new AVAudioPlayer (url, ptrtohandle);
                if (ap.Handle == IntPtr.Zero){
                    error = (NSError) Runtime.GetNSObject (errhandle);
                    return null;
                } else
                    error = null;
                return ap;
            }
        }
Esempio n. 12
0
        public static AVAudioPlayer FromData(NSData data)
        {
            unsafe {
                var ap = new AVAudioPlayer (data, IntPtr.Zero);
                if (ap.Handle == IntPtr.Zero)
                    return null;

                return ap;
            }
        }