Skip to content

Commit 430b8ec

Browse files
committed
Apply Bobby Smiles' suggestions
1 parent 2b773e2 commit 430b8ec

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

rsp_hle/alist.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@ void alist_iirf(
10321032
}
10331033

10341034
/* Perform a clamped gain, then attenuate it back by an amount */
1035-
void alist_overload(struct hle_t* hle, uint16_t dmem, int16_t count, int16_t gain, int16_t attenuation)
1035+
void alist_overload(struct hle_t* hle, uint16_t dmem, int16_t count, int16_t gain, uint16_t attenuation)
10361036
{
10371037
int16_t accu;
10381038
int16_t * sample = (int16_t*)(hle->alist_buffer + dmem);
@@ -1043,4 +1043,4 @@ void alist_overload(struct hle_t* hle, uint16_t dmem, int16_t count, int16_t gai
10431043
sample++;
10441044
count --;
10451045
}
1046-
}
1046+
}

rsp_hle/alist.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void alist_overload(
159159
uint16_t dmem,
160160
int16_t count,
161161
int16_t gain,
162-
int16_t attenuation);
162+
uint16_t attenuation);
163163

164164
/*
165165
* Audio flags

rsp_hle/alist_naudio.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ static void OVERLOAD(struct hle_t* hle, uint32_t w1, uint32_t w2)
267267
{
268268
/* Overload distortion effect for Conker's Bad Fur Day */
269269
uint16_t dmem = (w1 & 0xfff) + NAUDIO_MAIN;
270-
int16_t gain = w2 & 0x7fff;
271-
int16_t attenuation = w2 >> 16;
270+
int16_t gain = (int16_t)(uint16_t)w2;
271+
uint16_t attenuation = w2 >> 16;
272272

273273
alist_overload(hle, dmem, NAUDIO_COUNT, gain, attenuation);
274274
}
@@ -351,15 +351,15 @@ void alist_process_naudio_dk(struct hle_t* hle)
351351
void alist_process_naudio_mp3(struct hle_t* hle)
352352
{
353353
static const acmd_callback_t ABI[0x10] = {
354-
UNKNOWN, ADPCM, CLEARBUFF, ENVMIXER,
354+
OVERLOAD, ADPCM, CLEARBUFF, ENVMIXER,
355355
LOADBUFF, RESAMPLE, SAVEBUFF, MP3,
356356
MP3ADDY, SETVOL, DMEMMOVE, LOADADPCM,
357357
MIXER, INTERLEAVE, NAUDIO_14, SETLOOP
358358
};
359359

360360
#ifdef DEBUG_INFO
361361
static const char * ABI_names[0x10] = {
362-
"UNKNOWN", "ADPCM", "CLEARBUFF", "ENVMIXER",
362+
"OVERLOAD", "ADPCM", "CLEARBUFF", "ENVMIXER",
363363
"LOADBUFF", "RESAMPLE", "SAVEBUFF", "MP3",
364364
"MP3ADDY", "SETVOL", "DMEMMOVE", "LOADADPCM",
365365
"MIXER", "INTERLEAVE", "NAUDIO_14", "SETLOOP"
@@ -384,7 +384,7 @@ void alist_process_naudio_cbfd(struct hle_t* hle)
384384

385385
#ifdef DEBUG_INFO
386386
static const char * ABI_names[0x10] = {
387-
"UNKNOWN", "ADPCM", "CLEARBUFF", "ENVMIXER",
387+
"OVERLOAD", "ADPCM", "CLEARBUFF", "ENVMIXER",
388388
"LOADBUFF", "RESAMPLE", "SAVEBUFF", "MP3",
389389
"MP3ADDY", "SETVOL", "DMEMMOVE", "LOADADPCM",
390390
"MIXER", "INTERLEAVE", "NAUDIO_14", "SETLOOP"

0 commit comments

Comments
 (0)