« Return to Thread: just calling ALutInit(0,0) costs 20% of CPU

Re: just calling ALutInit(0,0) costs 20% of CPU

by jviklaus :: Rate this Message:

Reply to Author | View in Thread

Hello everyone,
I went to search a bit more on this, and found that an infinite loop with no pause is done in the file alsa.c of the library,
within the function :
        static ALuint ALSANoMMapProc(ALvoid *ptr);
the function is launched by a thread launched during the initialization (ALutInit)
this function watches if a new sound has arrived and sent it to the alsa layer,
the fact is even if there is nothing to play the loop is running,
so it requires a lot of memory..
Is this normal ?

 « Return to Thread: just calling ALutInit(0,0) costs 20% of CPU