mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-17 19:19:16 +01:00
Merge pull request #406 from bnnm/riff
Fix .at3/at9 mono files with wrong channel layout
This commit is contained in:
commit
041cfa3738
@ -121,6 +121,11 @@ static int read_fmt(int big_endian, STREAMFILE * streamFile, off_t current_chunk
|
||||
//fmt->extra_samples = read_16bit(current_chunk+0x1a,streamFile); /* valid_bits_per_sample or samples_per_block */
|
||||
fmt->channel_layout = read_32bit(current_chunk+0x1c,streamFile);
|
||||
/* 0x10 guid at 0x20 */
|
||||
|
||||
/* happens in .at3/at9, may be a bug in their encoder b/c MS's defs set mono as FC */
|
||||
if (fmt->channel_count == 1 && fmt->channel_layout == speaker_FL) { /* other channels are fine */
|
||||
fmt->channel_layout = speaker_FC;
|
||||
}
|
||||
}
|
||||
|
||||
switch (fmt->codec) {
|
||||
@ -158,7 +163,7 @@ static int read_fmt(int big_endian, STREAMFILE * streamFile, off_t current_chunk
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x11: /* MS IMA ADPCM [Layton Brothers: Mystery Room (iOS/Android)] */
|
||||
case 0x11: /* MS-IMA ADPCM [Layton Brothers: Mystery Room (iOS/Android)] */
|
||||
if (fmt->bps != 4) goto fail;
|
||||
fmt->coding_type = coding_MS_IMA;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user