Пример #1
0
 public BufferedDecoder(IVoiceDecoder decoder, uint frameSize, WaveFormat waveFormat, Action <EncodedAudio> recycleFrame)
 {
     _decoder      = decoder;
     _frameSize    = frameSize;
     _waveFormat   = waveFormat;
     _recycleFrame = recycleFrame;
     _buffer       = new EncodedAudioBuffer(recycleFrame);
 }
Пример #2
0
        public BufferedDecoder([NotNull] IVoiceDecoder decoder, uint frameSize, [NotNull] WaveFormat waveFormat, [NotNull] Action <VoicePacket> recycleFrame)
        {
            if (decoder == null)
            {
                throw new ArgumentNullException("decoder");
            }
            if (waveFormat == null)
            {
                throw new ArgumentNullException("waveFormat");
            }
            if (recycleFrame == null)
            {
                throw new ArgumentNullException("recycleFrame");
            }

            _decoder      = decoder;
            _frameSize    = frameSize;
            _waveFormat   = waveFormat;
            _recycleFrame = recycleFrame;
            _buffer       = new EncodedAudioBuffer(recycleFrame);
        }