diff --git a/src/coding/aica_decoder.c b/src/coding/aica_decoder.c index d1134c79..556f1986 100644 --- a/src/coding/aica_decoder.c +++ b/src/coding/aica_decoder.c @@ -22,7 +22,7 @@ void decode_aica(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, int i; int32_t sample_count; int32_t hist1 = stream->adpcm_history1_16; - unsigned long step_size = stream->adpcm_step_index; + uint32_t step_size = stream->adpcm_step_index; for (i=first_sample,sample_count=0; ichannel_start_offset; @@ -75,7 +75,7 @@ void decode_eaxa(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, void decode_ea_adpcm(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) { uint8_t frame_info; int32_t sample_count; - long coef1,coef2; + int32_t coef1,coef2; int i,shift; VGMSTREAMCHANNEL *stream = &(vgmstream->ch[channel]); off_t channel_offset=stream->channel_start_offset; @@ -123,7 +123,7 @@ void decode_ea_adpcm(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, void decode_maxis_adpcm(VGMSTREAM * vgmstream, sample * outbuf, int channelspacing, int32_t first_sample, int32_t samples_to_do,int channel) { uint8_t frame_info; int32_t sample_count; - long coef1,coef2; + int32_t coef1,coef2; int i,shift; int frameSize = channelspacing*15;//mono samples have a frame of 15, stereo files have frames of 30 VGMSTREAMCHANNEL *stream = &(vgmstream->ch[channel]); diff --git a/src/coding/lsf_decoder.c b/src/coding/lsf_decoder.c index 3bed7901..780aed13 100644 --- a/src/coding/lsf_decoder.c +++ b/src/coding/lsf_decoder.c @@ -30,7 +30,7 @@ void decode_lsf(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspacing, for (i=first_sample,sample_count=0; ioffset+1+i/2,stream->streamfile); - long prediction = + int32_t prediction = (hist1 * lsf_coefs[coef_idx][0] + hist2 * lsf_coefs[coef_idx][1]) / 0x40; diff --git a/src/coding/psx_decoder.c b/src/coding/psx_decoder.c index 7674f573..2687bfef 100644 --- a/src/coding/psx_decoder.c +++ b/src/coding/psx_decoder.c @@ -7,7 +7,7 @@ double VAG_f[5][2] = { { 0.0 , 0.0 }, { 115.0 / 64.0 , -52.0 / 64.0 }, { 98.0 / 64.0 , -55.0 / 64.0 } , { 122.0 / 64.0 , -60.0 / 64.0 } } ; -long VAG_coefs[5][2] = { { 0 , 0 }, +int32_t VAG_coefs[5][2] = { { 0 , 0 }, { 60 , 0 }, { 115 , -52 }, { 98 , -55 } , @@ -145,7 +145,7 @@ void decode_ffxi_adpcm(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelsp short scale; int i; int32_t sample_count; - long predictor; + int32_t predictor; int framesin = first_sample/16;