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); }
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); }