예제 #1
0
 public void Play()
 {
     if (task.Status == PlayerStatus.Paused)
     {
         task.Resume();
     }
     else
     {
         Stop();
         SpinWait.SpinUntil(() => task.Status == PlayerStatus.Stopped);
         if (task != null)
         {
             task.Dispose();
         }
         task = new CorePlayer(this);
         InitializeVorbisBuffer();
         start_time = DateTime.Now;
         task.Start();
     }
     view.SetPlayState();
     activity.RegisterReceiver(headset_status_receiver, new IntentFilter(AudioManager.ActionAudioBecomingNoisy));
 }
예제 #2
0
 public void Play()
 {
     if (task.Status == PlayerStatus.Paused)
         task.Resume ();
     else {
         Stop ();
         SpinWait.SpinUntil(() => task.Status == PlayerStatus.Stopped);
         if (task != null)
             task.Dispose ();
         task = new CorePlayer (this);
         InitializeVorbisBuffer ();
         start_time = DateTime.Now;
         task.Start ();
     }
     view.SetPlayState ();
     activity.RegisterReceiver (headset_status_receiver, new IntentFilter(AudioManager.ActionAudioBecomingNoisy));
 }