So i have tried setting this process up as a seperate thread, the only issue i seem to be having is that after a short period it stops working and no button presses get parsed, at the very start of the program the callback works reasonably well, still pauses slighty but not as ugly. Below is the call back code i have produced any help would be greatly appreciated::
Code: Select all
void controllertest(void *arg){
ctrl_data_t pad;
sceCtrlReadBufferPositive(&pad, 1);
if(pad.buttons & CTRL_RIGHT){
ModPlay_Stop();
ModPlay_Init(0,music2);
ModPlay_Play();
}
if(pad.buttons==CTRL_LEFT){
ModPlay_Stop();
ModPlay_Init(0,music3);
ModPlay_Play();
}
if(pad.buttons==CTRL_UP){
ModPlay_Stop();
ModPlay_Init(0,music4);
ModPlay_Play();
}
if(pad.buttons==CTRL_DOWN){
ModPlay_Stop();
ModPlay_Init(0,music5);
ModPlay_Play();
}
else
{
pgPrint(0,0,0xffff,"Now Playing :: ",0,255);
}
}
int setupcontroller(void){
int thrd = 0;
thrd = sceKernelCreateThread("audio_thread", controllertest, 0x11, 0xFA0, 0, 0);
if(thrd>=0)
sceKernelStartThread(thrd,0,0);
return thrd;
}
regards,
r3v3rb