예제 #1
0
        public Mp3FrameDecompressor(NAudio.Wave.WaveFormat waveFormat)
        {
            // we assume waveFormat was calculated from the first frame already
            OutputFormat = NAudio.Wave.WaveFormat.CreateIeeeFloatWaveFormat(waveFormat.SampleRate, waveFormat.Channels);

            _decoder = new MpegFrameDecoder();
            _frame   = new Mp3FrameWrapper();
        }
예제 #2
0
        public Mp3FrameDecompressor(WaveFormat waveFormat)
        {
            if (waveFormat is null)
            {
                throw new System.ArgumentNullException(nameof(waveFormat));
            }

            // we assume waveFormat was calculated from the first frame already
            OutputFormat = WaveFormat.CreateIeeeFloatWaveFormat(waveFormat.SampleRate, waveFormat.Channels);

            decoder = new MpegFrameDecoder();
            frame   = new Mp3FrameWrapper();
        }