internal ChdStream(IFlacDecoder flacDecoder, ILzmaDecoder lzmaDecoder, Stream baseStream) { _reader = new BinaryReader(baseStream); if (new string(_reader.ReadChars(8)) != "MComprHD") { throw new RhythmCodexException("Bad CHD header"); } var headerLength = _reader.ReadUInt32S(); var version = _reader.ReadUInt32S(); switch (version) { case 1: _header = ReadHeaderV1(); _map = ReadMapV1(); _readHunk = ReadHunkV1; break; case 2: _header = ReadHeaderV2(); _map = ReadMapV1(); _readHunk = ReadHunkV1; break; case 3: _header = ReadHeaderV3(); _map = ReadMapV3(); _readHunk = ReadHunkV3; break; case 4: _header = ReadHeaderV4(); _map = ReadMapV3(); _readHunk = ReadHunkV3; break; case 5: _header = ReadHeaderV5(); _map = ReadMapV5(); _readHunk = ReadHunkV5; break; default: throw new RhythmCodexException("Unrecognized CHD version"); } _flacDecoder = flacDecoder; _lzmaDecoder = lzmaDecoder; _baseStream = baseStream; }
internal ChdStream(IFlacDecoder flacDecoder, ILzmaDecoder lzmaDecoder, Stream baseStream, ChdStream parent) : this(flacDecoder, lzmaDecoder, baseStream) { _parent = parent; }
public ChdStreamFactory(IFlacDecoder flacDecoder, ILzmaDecoder lzmaDecoder) { _flacDecoder = flacDecoder; _lzmaDecoder = lzmaDecoder; }