Exemplo n.º 1
0
        public void Dispose()
        {
            disposed   = true;
            stopStream = true;
            client.Close();
            if (mp3FileReader != null)
            {
                mp3FileReader.Close();
            }
            if (mp3FileStream != null)
            {
                mp3FileStream.Close();
            }
            mp3FileReader = null;
            try
            {
                logFile.Close();
            }
            catch (Exception e)
            {
            }

            lock (streamingLock)
                Monitor.PulseAll(streamingLock);
        }
Exemplo n.º 2
0
 private long setMp3File(string fileName)
 {
     if (mp3FileReader != null)
     {
         mp3FileReader.Close();
         mp3FileStream.Close();
     }
     mp3FileStream =
         new FileStream(fileName, FileMode.Open);
     mp3FileReader = new IMp3FileReader(mp3FileStream);
     return(mp3FileStream.Length);
 }