mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-15 02:57:38 +01:00
EA SCHl: Minor doc + reordered codecs
This commit is contained in:
parent
69bec350fc
commit
3985f20e7b
@ -93,6 +93,39 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
* (with no blocks) may also have them in the first offset, but also may not. To simplify we just read them here. */
|
||||
if (!flag_offsets) { /* v0 doesn't provide channel offsets, they need to be calculated */
|
||||
switch (vgmstream->coding_type) {
|
||||
/* id, size, samples, data */
|
||||
case coding_PCM8_int:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (i*0x01);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples, data */
|
||||
case coding_PCM16_int:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (i*0x02);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples, data */
|
||||
case coding_PCM8:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (block_samples*i*0x01);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples, data */
|
||||
case coding_PCM16LE:
|
||||
case coding_PCM16BE:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (block_samples*i*0x02);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, unk1, unk2, interleaved data */
|
||||
case coding_PSX:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
@ -103,7 +136,7 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, IMA hist, stereo/mono data */
|
||||
/* id, size, samples, IMA hist, stereo/mono data */
|
||||
case coding_DVI_IMA:
|
||||
for(i = 0; i < vgmstream->channels; i++) {
|
||||
off_t header_offset = block_offset + 0xc + i*4;
|
||||
@ -114,39 +147,6 @@ void block_update_ea_schl(off_t block_offset, VGMSTREAM * vgmstream) {
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples */
|
||||
case coding_PCM8_int:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (i*0x01);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples */
|
||||
case coding_PCM16_int:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (i*0x02);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples */
|
||||
case coding_PCM8:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (block_samples*i*0x01);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples */
|
||||
case coding_PCM16LE:
|
||||
case coding_PCM16BE:
|
||||
for (i = 0; i < vgmstream->channels; i++) {
|
||||
vgmstream->ch[i].offset = block_offset + 0x0c + (block_samples*i*0x02);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* id, size, samples, hists-per-channel, stereo/interleaved data */
|
||||
case coding_EA_XA:
|
||||
case coding_EA_XA_int:
|
||||
|
@ -1682,7 +1682,7 @@ static int parse_variable_header(STREAMFILE* sf, ea_header* ea, off_t begin_offs
|
||||
if (ea->version == EA_VERSION_NONE) {
|
||||
switch(ea->platform) {
|
||||
case EA_PLATFORM_PC: ea->version = EA_VERSION_V0; break;
|
||||
case EA_PLATFORM_PSX: ea->version = EA_VERSION_V0; break; // assumed
|
||||
case EA_PLATFORM_PSX: ea->version = EA_VERSION_V0; break;
|
||||
case EA_PLATFORM_N64: ea->version = EA_VERSION_V0; break;
|
||||
case EA_PLATFORM_MAC: ea->version = EA_VERSION_V0; break;
|
||||
case EA_PLATFORM_SAT: ea->version = EA_VERSION_V0; break;
|
||||
@ -1704,9 +1704,9 @@ static int parse_variable_header(STREAMFILE* sf, ea_header* ea, off_t begin_offs
|
||||
if (ea->codec1 == EA_CODEC1_NONE && ea->version == EA_VERSION_V0) {
|
||||
switch(ea->platform) {
|
||||
case EA_PLATFORM_PC: ea->codec1 = EA_CODEC1_PCM; break;
|
||||
case EA_PLATFORM_PSX: ea->codec1 = EA_CODEC1_VAG; break; // assumed
|
||||
case EA_PLATFORM_PSX: ea->codec1 = EA_CODEC1_VAG; break;
|
||||
case EA_PLATFORM_N64: ea->codec1 = EA_CODEC1_N64; break;
|
||||
case EA_PLATFORM_MAC: ea->codec1 = EA_CODEC1_PCM; break; // assumed
|
||||
case EA_PLATFORM_MAC: ea->codec1 = EA_CODEC1_PCM; break;
|
||||
case EA_PLATFORM_SAT: ea->codec1 = EA_CODEC1_PCM; break;
|
||||
default:
|
||||
VGM_LOG("EA SCHl: unknown default codec1 for platform 0x%02x\n", ea->platform);
|
||||
|
Loading…
Reference in New Issue
Block a user