private static bool CheckForValidXingHeader(MP3Frame frame, int offset) { byte[] data = null; if (frame.ReadData(ref data, 0) < 4) { return(false); } if (data[offset + 0] == 'X' && data[offset + 1] == 'i' && data[offset + 2] == 'n' && data[offset + 3] == 'g') { return(true); } else { return(false); } }
private static int ReadHeaderFlags(MP3Frame frame, int offset) { byte[] data = null; if (frame.ReadData(ref data, 0) < 4) { throw new System.IO.EndOfStreamException(); } int i = 0; i = data[offset + 0]; i <<= 8; i |= data[offset + 1]; i <<= 8; i |= data[offset + 2]; i <<= 8; i |= data[offset + 3]; return(i); }
private static int ReadHeaderFlags(MP3Frame frame, int offset) { byte[] data = null; if (frame.ReadData(ref data, 0) < 4) throw new System.IO.EndOfStreamException(); int i = 0; i = data[offset + 0]; i <<= 8; i |= data[offset + 1]; i <<= 8; i |= data[offset + 2]; i <<= 8; i |= data[offset + 3]; return i; }
private static bool CheckForValidXingHeader(MP3Frame frame, int offset) { byte[] data = null; if (frame.ReadData(ref data, 0) < 4) return false; if (data[offset + 0] == 'X' && data[offset + 1] == 'i' && data[offset + 2] == 'n' && data[offset + 3] == 'g') { return true; } else return false; }