mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
Rename coding_INT_X to coding_X_int for consistency with other codecs
This commit is contained in:
parent
086a47cd76
commit
d5aee307f0
@ -404,7 +404,7 @@ static const coding_info coding_info_list[] = {
|
||||
{coding_HEVAG, "Playstation Vita HEVAG 4-bit ADPCM"},
|
||||
{coding_XA, "CD-ROM XA 4-bit ADPCM"},
|
||||
{coding_XBOX, "XBOX 4-bit IMA ADPCM"},
|
||||
{coding_INT_XBOX, "XBOX 4-bit IMA ADPCM (interleaved)"},
|
||||
{coding_XBOX_int, "XBOX 4-bit IMA ADPCM (interleaved)"},
|
||||
{coding_EA_XA, "Electronic Arts 4-bit ADPCM (XA based)"},
|
||||
{coding_EA_ADPCM, "Electronic Arts R1 4-bit ADPCM (XA based)"},
|
||||
{coding_SDX2, "Squareroot-delta-exact (SDX2) 8-bit DPCM"},
|
||||
@ -412,20 +412,20 @@ static const coding_info coding_info_list[] = {
|
||||
{coding_CBD2, "Cuberoot-delta-exact (CBD2) 8-bit DPCM"},
|
||||
{coding_CBD2_int, "Cuberoot-delta-exact (CBD2) 8-bit DPCM with 1 byte interleave"},
|
||||
{coding_DVI_IMA, "Intel DVI 4-bit IMA ADPCM"},
|
||||
{coding_INT_DVI_IMA, "Interleaved Intel DVI 4-bit IMA ADPCM"},
|
||||
{coding_DVI_IMA_int, "Intel DVI 4-bit IMA ADPCM (interleaved)"},
|
||||
{coding_EACS_IMA, "EACS 4-bit IMA ADPCM"},
|
||||
{coding_MAXIS_ADPCM, "Maxis XA (EA ADPCM Variant)"},
|
||||
{coding_INT_IMA, "Interleaved 4-bit IMA ADPCM"},
|
||||
{coding_IMA, "4-bit IMA ADPCM"},
|
||||
{coding_IMA_int, "IMA 4-bit ADPCM (interleaved)"},
|
||||
{coding_IMA, "IMA 4-bit ADPCM"},
|
||||
{coding_MS_IMA, "Microsoft 4-bit IMA ADPCM"},
|
||||
{coding_RAD_IMA, "'Radical' 4-bit IMA ADPCM"},
|
||||
{coding_RAD_IMA_mono, "'Radical' 4-bit IMA ADPCM (mono)"},
|
||||
{coding_RAD_IMA, "Radical 4-bit IMA ADPCM"},
|
||||
{coding_RAD_IMA_mono, "Radical 4-bit IMA ADPCM (mono)"},
|
||||
{coding_APPLE_IMA4, "Apple Quicktime 4-bit IMA ADPCM"},
|
||||
{coding_SNDS_IMA, "Heavy Iron .snds 4-bit IMA ADPCM"},
|
||||
{coding_OTNS_IMA, "Omikron: The Nomad Soul 4-bit IMA ADPCM"},
|
||||
{coding_FSB_IMA, "FSB multichannel 4-bit IMA ADPCM"},
|
||||
{coding_WWISE_IMA, "Audiokinetic Wwise 4-bit IMA ADPCM"},
|
||||
{coding_WS, "Westwood Studios ADPCM"},
|
||||
{coding_WS, "Westwood Studios VBR ADPCM"},
|
||||
{coding_ACM, "InterPlay ACM"},
|
||||
{coding_NWA0, "NWA DPCM Level 0"},
|
||||
{coding_NWA1, "NWA DPCM Level 1"},
|
||||
|
@ -59,7 +59,7 @@ VGMSTREAM * init_vgmstream_ads(STREAMFILE *streamFile) {
|
||||
start_offset = 0x28;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitBE(0x0c,streamFile);
|
||||
vgmstream->coding_type = coding_INT_XBOX;
|
||||
vgmstream->coding_type = coding_XBOX_int;
|
||||
vgmstream->num_samples = (read_32bitBE(0x24,streamFile) / 36 *64 / vgmstream->channels)-64; // to avoid the "pop" at the loop point
|
||||
vgmstream->layout_type = channel_count == 1 ? layout_none : layout_interleave;
|
||||
vgmstream->interleave_block_size = 0x24;
|
||||
|
@ -75,7 +75,7 @@ VGMSTREAM * init_vgmstream_bcstm(STREAMFILE *streamFile) {
|
||||
if (seek_offset == 0) goto fail;
|
||||
if ((uint32_t)read_32bitBE(seek_offset, streamFile) != 0x5345454B) { /* "SEEK" If this header doesn't exist, assuming that the file is IMA */
|
||||
ima = 1;
|
||||
coding_type = coding_INT_IMA;
|
||||
coding_type = coding_IMA_int;
|
||||
}
|
||||
else
|
||||
coding_type = coding_NGC_DSP;
|
||||
|
@ -29,7 +29,7 @@ VGMSTREAM * init_vgmstream_dc_idvi(STREAMFILE *streamFile) {
|
||||
vgmstream->channels = channel_count;
|
||||
start_offset = 0x800;
|
||||
vgmstream->sample_rate = read_32bitLE(0x08,streamFile);
|
||||
vgmstream->coding_type = coding_INT_DVI_IMA;
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
vgmstream->num_samples = (get_streamfile_size(streamFile)-start_offset);
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x0C,streamFile);
|
||||
|
@ -173,9 +173,9 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) {
|
||||
else {
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
if(coding==coding_DVI_IMA)
|
||||
coding=coding_INT_DVI_IMA;
|
||||
coding=coding_DVI_IMA_int;
|
||||
if(coding==coding_IMA)
|
||||
coding=coding_INT_IMA;
|
||||
coding=coding_IMA_int;
|
||||
}
|
||||
} else {
|
||||
vgmstream->layout_type = layout_none;
|
||||
|
@ -36,7 +36,7 @@ VGMSTREAM * init_vgmstream_ivaud(STREAMFILE *streamFile) {
|
||||
block_table_offset = read_32bitLE(0,streamFile);
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitLE(block_table_offset + 0x04,streamFile);
|
||||
vgmstream->coding_type = coding_INT_IMA;
|
||||
vgmstream->coding_type = coding_IMA_int;
|
||||
|
||||
vgmstream->layout_type = layout_ivaud_blocked;
|
||||
vgmstream->meta_type = meta_PC_IVAUD;
|
||||
|
@ -28,7 +28,7 @@ VGMSTREAM * init_vgmstream_nds_hwas(STREAMFILE *streamFile) {
|
||||
start_offset = 0x200;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitLE(0x08,streamFile);
|
||||
vgmstream->coding_type = coding_INT_IMA;
|
||||
vgmstream->coding_type = coding_IMA_int;
|
||||
vgmstream->num_samples = read_32bitLE(0x14,streamFile);
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x10,streamFile);
|
||||
|
@ -27,7 +27,7 @@ VGMSTREAM * init_vgmstream_sadl(STREAMFILE *streamFile) {
|
||||
switch (read_8bit(0x33,streamFile)&0xf0)
|
||||
{
|
||||
case 0x70:
|
||||
coding_type = coding_INT_IMA;
|
||||
coding_type = coding_IMA_int;
|
||||
break;
|
||||
case 0xb0:
|
||||
coding_type = coding_NDS_PROCYON;
|
||||
@ -61,7 +61,7 @@ VGMSTREAM * init_vgmstream_sadl(STREAMFILE *streamFile) {
|
||||
|
||||
vgmstream->coding_type = coding_type;
|
||||
|
||||
if (coding_type == coding_INT_IMA)
|
||||
if (coding_type == coding_IMA_int)
|
||||
vgmstream->num_samples =
|
||||
(read_32bitLE(0x40,streamFile)-start_offset)/channel_count*2;
|
||||
else if (coding_type == coding_NDS_PROCYON)
|
||||
@ -72,7 +72,7 @@ VGMSTREAM * init_vgmstream_sadl(STREAMFILE *streamFile) {
|
||||
|
||||
if (loop_flag)
|
||||
{
|
||||
if (coding_type == coding_INT_IMA)
|
||||
if (coding_type == coding_IMA_int)
|
||||
vgmstream->loop_start_sample = (read_32bitLE(0x54,streamFile)-start_offset)/channel_count*2;
|
||||
else
|
||||
vgmstream->loop_start_sample = (read_32bitLE(0x54,streamFile)-start_offset)/channel_count/16*30;
|
||||
|
@ -134,7 +134,7 @@ VGMSTREAM * init_vgmstream_nds_strm_ffta2(STREAMFILE *streamFile) {
|
||||
start_offset = 0x2C;
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitLE(0x0C,streamFile);
|
||||
vgmstream->coding_type = coding_INT_IMA;
|
||||
vgmstream->coding_type = coding_IMA_int;
|
||||
vgmstream->num_samples = (read_32bitLE(0x04,streamFile)-start_offset);
|
||||
if (loop_flag) {
|
||||
vgmstream->loop_start_sample = read_32bitLE(0x20,streamFile);
|
||||
|
@ -49,7 +49,7 @@ VGMSTREAM * init_vgmstream_nds_swav(STREAMFILE *streamFile) {
|
||||
bits_per_sample = 16;
|
||||
break;
|
||||
case 2:
|
||||
coding_type = coding_INT_IMA;
|
||||
coding_type = coding_IMA_int;
|
||||
bits_per_sample = 4;
|
||||
break;
|
||||
default:
|
||||
@ -74,7 +74,7 @@ VGMSTREAM * init_vgmstream_nds_swav(STREAMFILE *streamFile) {
|
||||
vgmstream->loop_start_sample;
|
||||
}
|
||||
|
||||
if (coding_type == coding_INT_IMA) {
|
||||
if (coding_type == coding_IMA_int) {
|
||||
/* handle IMA frame header */
|
||||
vgmstream->loop_start_sample -= 32 / bits_per_sample;
|
||||
vgmstream->loop_end_sample -= 32 / bits_per_sample;
|
||||
|
@ -31,7 +31,7 @@ VGMSTREAM * init_vgmstream_ps2_snd(STREAMFILE *streamFile) {
|
||||
vgmstream->sample_rate = (uint16_t)read_16bitLE(0xe,streamFile);
|
||||
|
||||
if(read_8bit(0x08,streamFile)==1) {
|
||||
vgmstream->coding_type = coding_INT_DVI_IMA;
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
}
|
||||
else
|
||||
vgmstream->coding_type = coding_PCM16LE;
|
||||
|
@ -33,7 +33,7 @@ VGMSTREAM * init_vgmstream_ps2_stm(STREAMFILE *streamFile) {
|
||||
start_offset = 0x800;
|
||||
vgmstream->sample_rate = (uint16_t)read_32bitLE(0xc,streamFile);
|
||||
|
||||
vgmstream->coding_type = coding_INT_DVI_IMA;
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
|
||||
vgmstream->num_samples = read_32bitLE(0x18,streamFile);
|
||||
|
||||
|
@ -29,7 +29,7 @@ VGMSTREAM * init_vgmstream_dvi(STREAMFILE *streamFile) {
|
||||
vgmstream->channels = channel_count;
|
||||
start_offset = read_32bitBE(0x04,streamFile);
|
||||
vgmstream->sample_rate = 44100;
|
||||
vgmstream->coding_type = coding_INT_DVI_IMA;
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
|
||||
vgmstream->num_samples = read_32bitBE(0x08,streamFile);
|
||||
|
||||
|
@ -34,7 +34,7 @@ VGMSTREAM * init_vgmstream_xbox_stma(STREAMFILE *streamFile) {
|
||||
/* fill in the vital statistics */
|
||||
vgmstream->channels = channel_count;
|
||||
vgmstream->sample_rate = read_32bitLE(0x0C,streamFile);
|
||||
vgmstream->coding_type = coding_INT_DVI_IMA;
|
||||
vgmstream->coding_type = coding_DVI_IMA_int;
|
||||
vgmstream->num_samples = read_32bitLE(0x18,streamFile)*2/vgmstream->channels;
|
||||
vgmstream->layout_type = layout_interleave;
|
||||
vgmstream->interleave_block_size=0x40;
|
||||
|
@ -1071,8 +1071,8 @@ int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) {
|
||||
case coding_IMA:
|
||||
case coding_OTNS_IMA:
|
||||
return 1;
|
||||
case coding_INT_IMA:
|
||||
case coding_INT_DVI_IMA:
|
||||
case coding_IMA_int:
|
||||
case coding_DVI_IMA_int:
|
||||
case coding_AICA:
|
||||
return 2;
|
||||
case coding_NGC_AFC:
|
||||
@ -1086,7 +1086,7 @@ int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) {
|
||||
case coding_PSX_cfg:
|
||||
return (vgmstream->interleave_block_size - 1) * 2; /* decodes 1 byte into 2 bytes */
|
||||
case coding_XBOX:
|
||||
case coding_INT_XBOX:
|
||||
case coding_XBOX_int:
|
||||
case coding_FSB_IMA:
|
||||
return 64;
|
||||
case coding_EA_XA:
|
||||
@ -1223,7 +1223,7 @@ int get_vgmstream_frame_size(VGMSTREAM * vgmstream) {
|
||||
case coding_XA:
|
||||
return 14*vgmstream->channels;
|
||||
case coding_XBOX:
|
||||
case coding_INT_XBOX:
|
||||
case coding_XBOX_int:
|
||||
case coding_FSB_IMA:
|
||||
return 36;
|
||||
case coding_MAXIS_ADPCM:
|
||||
@ -1234,8 +1234,8 @@ int get_vgmstream_frame_size(VGMSTREAM * vgmstream) {
|
||||
return 1; // the frame is variant in size
|
||||
case coding_WS:
|
||||
return vgmstream->current_block_size;
|
||||
case coding_INT_IMA:
|
||||
case coding_INT_DVI_IMA:
|
||||
case coding_IMA_int:
|
||||
case coding_DVI_IMA_int:
|
||||
case coding_AICA:
|
||||
return 1;
|
||||
case coding_APPLE_IMA4:
|
||||
@ -1400,7 +1400,7 @@ void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to
|
||||
samples_to_do,chan);
|
||||
}
|
||||
break;
|
||||
case coding_INT_XBOX:
|
||||
case coding_XBOX_int:
|
||||
for (chan=0;chan<vgmstream->channels;chan++) {
|
||||
decode_int_xbox_ima(vgmstream,&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
||||
vgmstream->channels,vgmstream->samples_into_block,
|
||||
@ -1586,7 +1586,7 @@ void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to
|
||||
}
|
||||
break;
|
||||
case coding_DVI_IMA:
|
||||
case coding_INT_DVI_IMA:
|
||||
case coding_DVI_IMA_int:
|
||||
for (chan=0;chan<vgmstream->channels;chan++) {
|
||||
decode_dvi_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
||||
vgmstream->channels,vgmstream->samples_into_block,
|
||||
@ -1601,7 +1601,7 @@ void decode_vgmstream(VGMSTREAM * vgmstream, int samples_written, int samples_to
|
||||
}
|
||||
break;
|
||||
case coding_IMA:
|
||||
case coding_INT_IMA:
|
||||
case coding_IMA_int:
|
||||
for (chan=0;chan<vgmstream->channels;chan++) {
|
||||
decode_ima(&vgmstream->ch[chan],buffer+samples_written*vgmstream->channels+chan,
|
||||
vgmstream->channels,vgmstream->samples_into_block,
|
||||
|
@ -107,16 +107,16 @@ typedef enum {
|
||||
coding_NDS_PROCYON, /* Procyon Studio ADPCM */
|
||||
|
||||
coding_XBOX, /* XBOX IMA ADPCM */
|
||||
coding_INT_XBOX, /* XBOX IMA ADPCM (interleaved) */
|
||||
coding_XBOX_int, /* XBOX IMA ADPCM (interleaved) */
|
||||
coding_IMA, /* IMA ADPCM (low nibble first) */
|
||||
coding_INT_IMA, /* IMA ADPCM (interleaved) */
|
||||
coding_IMA_int, /* IMA ADPCM (interleaved) */
|
||||
coding_DVI_IMA, /* DVI IMA ADPCM (high nibble first), aka ADP4 */
|
||||
coding_INT_DVI_IMA, /* DVI IMA ADPCM (Interleaved) */
|
||||
coding_DVI_IMA_int, /* DVI IMA ADPCM (Interleaved) */
|
||||
coding_NDS_IMA, /* IMA ADPCM w/ NDS layout */
|
||||
coding_EACS_IMA,
|
||||
coding_MS_IMA, /* Microsoft IMA */
|
||||
coding_RAD_IMA, /* "Radical ADPCM" IMA */
|
||||
coding_RAD_IMA_mono, /* "Radical ADPCM" IMA, mono (for interleave) */
|
||||
coding_RAD_IMA, /* Radical IMA ADPCM */
|
||||
coding_RAD_IMA_mono, /* Radical IMA ADPCM, mono (for interleave) */
|
||||
coding_APPLE_IMA4, /* Apple Quicktime IMA4 */
|
||||
coding_DAT4_IMA, /* Eurocom 'DAT4' IMA ADPCM */
|
||||
coding_SNDS_IMA, /* Heavy Iron Studios .snds IMA ADPCM */
|
||||
|
Loading…
Reference in New Issue
Block a user