mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
a few more mid-block indiscretions
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@679 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
8807dad000
commit
041fa66065
@ -55,16 +55,17 @@ VGMSTREAM * init_vgmstream_apple_caff(STREAMFILE *streamFile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
uint32_t bytes_per_packet, frames_per_packet, channels_per_frame, bits_per_channel;
|
||||||
uint32_t codec_4cc = read_32bitBE(chunk_offset+0x14, streamFile);
|
uint32_t codec_4cc = read_32bitBE(chunk_offset+0x14, streamFile);
|
||||||
/* only supporting ima4 for now */
|
/* only supporting ima4 for now */
|
||||||
if (codec_4cc != 0x696d6134) goto fail;
|
if (codec_4cc != 0x696d6134) goto fail;
|
||||||
|
|
||||||
/* format flags */
|
/* format flags */
|
||||||
if (read_32bitBE(chunk_offset+0x18, streamFile) != 0) goto fail;
|
if (read_32bitBE(chunk_offset+0x18, streamFile) != 0) goto fail;
|
||||||
uint32_t bytes_per_packet = read_32bitBE(chunk_offset+0x1c, streamFile);
|
bytes_per_packet = read_32bitBE(chunk_offset+0x1c, streamFile);
|
||||||
uint32_t frames_per_packet = read_32bitBE(chunk_offset+0x20, streamFile);
|
frames_per_packet = read_32bitBE(chunk_offset+0x20, streamFile);
|
||||||
uint32_t channels_per_frame = read_32bitBE(chunk_offset+0x24, streamFile);
|
channels_per_frame = read_32bitBE(chunk_offset+0x24, streamFile);
|
||||||
uint32_t bits_per_channel = read_32bitBE(chunk_offset+0x28, streamFile);
|
bits_per_channel = read_32bitBE(chunk_offset+0x28, streamFile);
|
||||||
|
|
||||||
interleave = bytes_per_packet / channels_per_frame;
|
interleave = bytes_per_packet / channels_per_frame;
|
||||||
channel_count = channels_per_frame;
|
channel_count = channels_per_frame;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user