Пример #1
0
        private void CloseFile()
        {
            AudioFileReader?.Dispose();
            AudioFileReader = null;

            WavePlayer?.Dispose();
            WavePlayer = null;

            Providers?.Dispose();
            Providers = null;
        }
Пример #2
0
        public void OpenFile(string FileName, AudioFileReaderEx AudioFileReader, IWavePlayer WavePlayer)
        {
            try
            {
                this.AudioFileReader = AudioFileReader;
                this.WavePlayer      = WavePlayer;

                Providers.BaseReader = AudioFileReader;
                WavePlayer.Init(Providers.Initialize());
            }
            catch (Exception e)
            {
                Dispose();
                throw e;
            }
        }