mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(RHA): corrected frame length calculation.
This commit is contained in:
parent
19f40169e2
commit
f4363f3200
@ -93,8 +93,6 @@ namespace GameRes.Formats.Rugp
|
||||
return false;
|
||||
if (null == frame_buffer || frame_length > frame_buffer.Length)
|
||||
frame_buffer = new byte[frame_length];
|
||||
if (0 == (header & (1 << 16)))
|
||||
frame_length += 2;
|
||||
if (frame_length != input.Read (frame_buffer, 0, frame_length))
|
||||
break;
|
||||
output.Write (Binary.BigEndian (header));
|
||||
@ -129,6 +127,8 @@ namespace GameRes.Formats.Rugp
|
||||
int frame_length = BitRates[lsf, bitrate_index] * 144000;
|
||||
frame_length /= Mp3Freqs[freq] << lsf;
|
||||
frame_length += padding - 4;
|
||||
if (0 == (header & (1 << 16)))
|
||||
frame_length += 2;
|
||||
return frame_length;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user