/// <summary>Decodes the response from the AccurateRip server</summary> /// <param name="reader">Reader the server's response can be read from</param> /// <param name="trackCount">Number of tracks to decode</param> private static AccurateRip.TrackInfo[] decodeQueryResponseTracks( BinaryReader reader, int trackCount ) { AccurateRip.TrackInfo[] trackInfos = new AccurateRip.TrackInfo[trackCount]; for(int trackIndex = 0; trackIndex < trackCount; ++trackIndex) { trackInfos[trackIndex].Confidence = reader.ReadByte(); trackInfos[trackIndex].Crc32 = reader.ReadInt32(); // No idea what these four bytes contain! reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); } return trackInfos; }
/// <summary>Decodes the response from the AccurateRip server</summary> /// <param name="reader">Reader the server's response can be read from</param> /// <param name="trackCount">Number of tracks to decode</param> private static AccurateRip.TrackInfo[] decodeQueryResponseTracks( BinaryReader reader, int trackCount ) { AccurateRip.TrackInfo[] trackInfos = new AccurateRip.TrackInfo[trackCount]; for (int trackIndex = 0; trackIndex < trackCount; ++trackIndex) { trackInfos[trackIndex].Confidence = reader.ReadByte(); trackInfos[trackIndex].Crc32 = reader.ReadInt32(); // No idea what these four bytes contain! reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); reader.BaseStream.ReadByte(); } return(trackInfos); }