mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
Add EA Opus uncoupled .sps [FIFA 22 (PC)]
This commit is contained in:
parent
4bdf44ad4a
commit
7e8cb33167
@ -501,7 +501,7 @@ static size_t make_opus_header(uint8_t* buf, int buf_size, opus_config *cfg) {
|
|||||||
int mapping_family = 0;
|
int mapping_family = 0;
|
||||||
|
|
||||||
/* special multichannel config */
|
/* special multichannel config */
|
||||||
if (cfg->channels > 2) {
|
if (cfg->channels > 2 || cfg->stream_count > 1) {
|
||||||
/* channel config: 0=standard (single stream mono/stereo), 1=vorbis, 255: not defined */
|
/* channel config: 0=standard (single stream mono/stereo), 1=vorbis, 255: not defined */
|
||||||
mapping_family = 1;
|
mapping_family = 1;
|
||||||
header_size += 0x01+0x01+cfg->channels;
|
header_size += 0x01+0x01+cfg->channels;
|
||||||
|
@ -1301,7 +1301,7 @@ static VGMSTREAM* init_vgmstream_eaaudiocore_header(STREAMFILE* sf_head, STREAMF
|
|||||||
if (!sf) goto fail;
|
if (!sf) goto fail;
|
||||||
|
|
||||||
/* build the VGMSTREAM */
|
/* build the VGMSTREAM */
|
||||||
vgmstream = allocate_vgmstream(eaac.channels,eaac.loop_flag);
|
vgmstream = allocate_vgmstream(eaac.channels, eaac.loop_flag);
|
||||||
if (!vgmstream) goto fail;
|
if (!vgmstream) goto fail;
|
||||||
|
|
||||||
vgmstream->sample_rate = eaac.sample_rate;
|
vgmstream->sample_rate = eaac.sample_rate;
|
||||||
@ -1475,8 +1475,8 @@ static VGMSTREAM* init_vgmstream_eaaudiocore_header(STREAMFILE* sf_head, STREAMF
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef VGM_USE_FFMPEG
|
#ifdef VGM_USE_FFMPEG
|
||||||
//case EAAC_CODEC_EAOPUSMU: /* "MSU0": Multi-Stream Opus Uncoupled (not seen) */
|
case EAAC_CODEC_EAOPUSM: /* "MSO0": Multi-Stream Opus [FIFA 2021 (PC)] */
|
||||||
case EAAC_CODEC_EAOPUSM: { /* "MSO0": Multi-Stream Opus */
|
case EAAC_CODEC_EAOPUSMU: { /* "MSU0": Multi-Stream Opus Uncoupled [FIFA 2022 (PC)] */
|
||||||
off_t offset = 0x00; // eaac.stream_offset;
|
off_t offset = 0x00; // eaac.stream_offset;
|
||||||
off_t data_size = get_streamfile_size(sf);
|
off_t data_size = get_streamfile_size(sf);
|
||||||
opus_config cfg = {0};
|
opus_config cfg = {0};
|
||||||
@ -1498,12 +1498,11 @@ static VGMSTREAM* init_vgmstream_eaaudiocore_header(STREAMFILE* sf_head, STREAMF
|
|||||||
else {
|
else {
|
||||||
switch(eaac.channels) {
|
switch(eaac.channels) {
|
||||||
//case 8: cfg.coupled_count = 3; break; /* 2ch+2ch+2ch+1ch+1ch, 5 streams */
|
//case 8: cfg.coupled_count = 3; break; /* 2ch+2ch+2ch+1ch+1ch, 5 streams */
|
||||||
//case 6: /* 2ch+2ch+1ch+1ch, 4 streams */
|
//case 6: cfg.coupled_count = 2; break; /* 2ch+2ch+1ch+1ch, 4 streams */
|
||||||
case 4: cfg.coupled_count = 2; break; /* 2ch+2ch, 2 streams */
|
case 4: cfg.coupled_count = 2; break; /* 2ch+2ch, 2 streams */
|
||||||
//case 3: /* 2ch+1ch, 2 streams */
|
|
||||||
case 2: cfg.coupled_count = 1; break; /* 2ch, 1 stream */
|
case 2: cfg.coupled_count = 1; break; /* 2ch, 1 stream */
|
||||||
case 1: cfg.coupled_count = 0; break; /* 1ch, 1 stream [Madden 22 (PC)] */
|
case 1: cfg.coupled_count = 0; break; /* 1ch, 1 stream [Madden 22 (PC)] */
|
||||||
default: goto fail;
|
default: goto fail; /* possibly: streams = Nch / 2, coupled = Nch % 2 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user