NVorbis.VorbisReader.SwitchStreams C# (CSharp) Метод

SwitchStreams() публичный Метод

Switches to an alternate logical stream.
public SwitchStreams ( int index ) : bool
index int The logical stream index to switch to
Результат bool
        public bool SwitchStreams(int index)
        {
            if (index < 0 || index >= StreamCount) throw new ArgumentOutOfRangeException("index");

            if (_decoders == null) throw new ObjectDisposedException("VorbisReader");

            if (_streamIdx == index) return false;

            var curDecoder = _decoders[_streamIdx];
            _streamIdx = index;
            var newDecoder = _decoders[_streamIdx];

            return curDecoder._channels != newDecoder._channels || curDecoder._sampleRate != newDecoder._sampleRate;
        }