Thread support on GameCube <gccore.h>

Post Reply
User avatar
HudsonBr
Posts: 29
Joined: Wed May 05, 2021 8:15 pm

Thread support on GameCube <gccore.h>

Post by HudsonBr » Fri May 14, 2021 1:03 am

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
..::Game Developer::..

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Thread support on GameCube <gccore.h>

Post by WinterMute » 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
Help keep devkitPro toolchains free, Donate today

Personal Blog

User avatar
HudsonBr
Posts: 29
Joined: Wed May 05, 2021 8:15 pm

Re: Thread support on GameCube <gccore.h>

Post by HudsonBr » Thu May 27, 2021 4:02 pm

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.
..::Game Developer::..

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests