This commit is contained in:
Sam Lantinga 2013-06-28 20:46:11 -07:00
commit 8cf62ac298
121 changed files with 579 additions and 22715 deletions

View file

@ -273,6 +273,11 @@ IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
Sint32 delta, step;
/* Compute difference and new sample value */
if (state->index > 88) {
state->index = 88;
} else if (state->index < 0) {
state->index = 0;
}
step = step_table[state->index];
delta = step >> 3;
if (nybble & 0x04)
@ -287,11 +292,6 @@ IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
/* Update index value */
state->index += index_table[nybble];
if (state->index > 88) {
state->index = 88;
} else if (state->index < 0) {
state->index = 0;
}
/* Clamp output sample */
if (state->sample > max_audioval) {