Ejemplo 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");
		}
Ejemplo n.º 2
0
 public override void BeginInterruption(AVAudioPlayer player)
 {
     if (cbBeginInterruption != null)
     {
         cbBeginInterruption(player, EventArgs.Empty);
     }
 }
Ejemplo n.º 3
0
 public override void DecoderError(AVAudioPlayer player, NSError error)
 {
     if (cbDecoderError != null)
     {
         cbDecoderError(player, new AVErrorEventArgs(error));
     }
 }
Ejemplo 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");
     }
 }
Ejemplo 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);
            }
        }
Ejemplo 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);
            }
        }
Ejemplo 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);
            }
        }
Ejemplo n.º 8
0
		public override void EndInterruption (AVAudioPlayer player)
		{
			if (cbEndInterruption != null)
				cbEndInterruption (player, EventArgs.Empty);
		}
Ejemplo n.º 9
0
		public override void DecoderError (AVAudioPlayer player, NSError  error)
		{
			if (cbDecoderError != null)
				cbDecoderError (player, new AVErrorEventArgs (error));
		}
Ejemplo 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;
            }
        }
Ejemplo 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;
            }
        }
Ejemplo 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;
            }
        }