mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-10 04:03:54 +08:00
(RHA): check for CRC bit.
This commit is contained in:
parent
aa72c6f8b6
commit
16720db6e6
@ -110,6 +110,9 @@ namespace GameRes.Formats.Rugp
|
|||||||
|
|
||||||
output.Write (Binary.BigEndian (header));
|
output.Write (Binary.BigEndian (header));
|
||||||
output.Write (frame_buffer, 0, frame_length);
|
output.Write (frame_buffer, 0, frame_length);
|
||||||
|
|
||||||
|
if (0 == (header & (1 << 16))) // CRC bit
|
||||||
|
output.Write (input.ReadUInt16());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mp3.Length > 0;
|
return mp3.Length > 0;
|
||||||
@ -140,8 +143,6 @@ namespace GameRes.Formats.Rugp
|
|||||||
int frame_length = BitRates[lsf, bitrate_index] * 144000;
|
int frame_length = BitRates[lsf, bitrate_index] * 144000;
|
||||||
frame_length /= Mp3Freqs[freq] << lsf;
|
frame_length /= Mp3Freqs[freq] << lsf;
|
||||||
frame_length += padding - 4;
|
frame_length += padding - 4;
|
||||||
// if (0 == (header & (1 << 16)))
|
|
||||||
// frame_length += 2;
|
|
||||||
return frame_length;
|
return frame_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user