InitSound() eats cpu for no reason

Mac OSX specific forum
User avatar
deseven
Enthusiast
Enthusiast
Posts: 362
Joined: Wed Jan 12, 2011 3:48 pm
Location: Serbia
Contact:

InitSound() eats cpu for no reason

Post 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
Fred
Administrator
Administrator
Posts: 16619
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

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

Post 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.
Post Reply