Page 1 of 1

Thread support on GameCube <gccore.h>

Posted: Fri May 14, 2021 1:03 am
by HudsonBr
Hi,
I am trying to play the sound FX in a separated thread and the game freeze in the thread call.
i am including <thread> and using in this way

Code: Select all

std::thread first(play);
where play is a function

Code: Select all

void play() {
    MP3Player_PlayBuffer(beep_mp3, beep_mp3_size, NULL);
}
Any tips ?
Thanks in advance,
Hudson Schumaker

Re: Thread support on GameCube <gccore.h>

Posted: Thu May 27, 2021 2:33 pm
by WinterMute
Sorry, std::thread is not currently supported on gamecube. In the meantime you can use the lwp threads api in libogc. See for instance https://github.com/devkitPro/gamecube-e ... .c#L38-L43

Re: Thread support on GameCube <gccore.h>

Posted: Thu May 27, 2021 4:02 pm
by HudsonBr
WinterMute wrote: Thu May 27, 2021 2:33 pm Sorry, std::thread is not currently supported on gamecube. In the meantime you can use the lwp threads api in libogc. See for instance https://github.com/devkitPro/gamecube-e ... .c#L38-L43
I will try that, thanks for the help.