Example #1
0
 protected override void AfterStop()
 {
     if (m_Playing)
     {
         m_Playing = false;
         m_Stream.Close();
         m_Stream = null;
     }
 }
Example #2
0
        protected override void BeforePlay()
        {
            if (m_Playing)
            {
                Stop();
            }

            m_Stream = new MP3Stream(Path, NUMBER_OF_PCM_BYTES_TO_READ_PER_CHUNK);
            Frequency = m_Stream.Frequency;

            m_Playing = true;
        }
Example #3
0
        protected override void BeforePlay()
        {
            if (m_Playing)
            {
                Stop();
            }

            try
            {
                m_Stream = new MP3Stream(Path, NUMBER_OF_PCM_BYTES_TO_READ_PER_CHUNK);
                Frequency = m_Stream.Frequency;

                m_Playing = true;
            }
            catch (Exception e)
            {
                // file in use or access denied.
                Tracer.Error(e);
                m_Playing = false;
            }
        }