Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseAaronLopezGarcia committed Jul 24, 2023
1 parent 0cdff60 commit 62d01c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 31 deletions.
14 changes: 0 additions & 14 deletions extras/modules/peops/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,4 @@ enum SPU_Priorities{
SPU_PRIORITY_VERY_HIGH = 4,
};

typedef struct
{
/* PEOPS SPU configuration */
int volume;
int reverb;
int interpolation;
int changexapitch;
int spuirqwait;
int spuupdatemode;
int sputhreadpriority;
} PeopsConfig;

extern PeopsConfig config;

#endif
15 changes: 4 additions & 11 deletions extras/modules/peops/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,8 @@

PSP_MODULE_INFO("peops", 0x0007, 1, 0);

PeopsConfig config = {
.volume = 3,
.reverb = REVERB_OFF,
.interpolation = INTERPOLATION_GAUSS,
.changexapitch = 0,
.spuirqwait = 1,
.spuupdatemode = SPU_WAITVBLANK,
.sputhreadpriority = SPU_PRIORITY_VERY_LOW,
};
int spuupdatemode = SPU_WAITVBLANK;
int sputhreadpriority = SPU_PRIORITY_VERY_LOW;

void (*previous)(void*);

Expand All @@ -46,7 +39,7 @@ xa_decode_t cdr_xa;

void SPUwait()
{
switch(config.spuupdatemode)
switch(spuupdatemode)
{
case SPU_WAITVBLANK:
sceDisplayWaitVblankStart();
Expand Down Expand Up @@ -80,7 +73,7 @@ void sceMeAudioInitPatched(int (* function)(), void *stack)

static int priorities[] = { 17, 24, 32, 40, 48 };

SceUID thid = sceKernelCreateThread("spu_thread", spu_thread, priorities[config.sputhreadpriority % (sizeof(priorities) / sizeof(int))], 0x4000, 0, NULL);
SceUID thid = sceKernelCreateThread("spu_thread", spu_thread, priorities[sputhreadpriority % (sizeof(priorities) / sizeof(int))], 0x4000, 0, NULL);
if(thid >= 0) sceKernelStartThread(thid, 0, NULL);
}

Expand Down
4 changes: 0 additions & 4 deletions extras/modules/peops/psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,4 @@ unsigned long timeGetTime()

void ReadConfig(void)
{
iVolume = 4 - config.volume;
iXAPitch = config.changexapitch;
iUseReverb = config.reverb;
iUseInterpolation = config.interpolation;
}
4 changes: 2 additions & 2 deletions extras/modules/peops/spu/spu.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ unsigned char * pMixIrq=0;

// user settings

int iVolume=3;
int iVolume=1;
int iXAPitch=1;
int iUseTimer=0;
int iSPUIRQWait=0;
int iSPUIRQWait=1;
int iDebugMode=0;
int iRecordMode=0;
int iUseReverb=0;
Expand Down

0 comments on commit 62d01c5

Please sign in to comment.