Exemple #1
0
 private void OnStopPlaying(IntPtr context)
 {
     if (m_voice.State.BuffersQueued == 0)
     {
         m_isPlaying = false;
         m_owner.OnStopPlaying(this);
         if (StoppedPlaying != null)
         {
             StoppedPlaying();
         }
     }
 }
Exemple #2
0
 private void OnStopPlaying(IntPtr context)
 {
     if (m_dataStreams.Count > 0)
     {
         var dataStream = m_dataStreams.Dequeue();
         dataStream.Dispose();
     }
     if (m_voice.State.BuffersQueued == 0)
     {
         m_buffered  = false;
         m_isPlaying = false;
         if (m_owner != null)
         {
             m_owner.OnStopPlaying(this);
         }
         if (StoppedPlaying != null)
         {
             StoppedPlaying();
         }
     }
 }