Page 1 of 1

InitSound() eats cpu for no reason

Posted: Mon Oct 04, 2021 6:58 am
by deseven
Simply calling InitSound() spawns 2 additional threads that eat cpu while doing nothing. It takes 0.5% of one core on my system. Debugger on/off or any other compiler params don't change anything, macOS version seems to not influence that either.

Code: Select all

InitSound()
OpenWindow(0,0,0,400,300,"",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow

Re: [5.73] InitSound() eats cpu for no reason

Posted: Wed Apr 06, 2022 4:25 pm
by Fred
We don't create the thread explicitely, it's the call to AudioOutputUnitStart() which does it. It's required to get sound output, so I don't know how we can avoid this.