untz high CPU

File bug reports and troubleshoot crashes.

Moderator: JDance

untz high CPU

Postby daltomi » Mon Apr 28, 2014 11:48 pm

Hello. Not speak good english, so I will be brief.
Into the file: untz/src/native/sdl/UntzSystem.cpp line 110
Code: Select all
  1.  

  2. ........

  3. /* Open the audio device and start playing sound! */

  4. if ( SDL_OpenAudio(&fmt, NULL) < 0 ) {

  5.     fprintf(stderr, "Unable to open audio: %s\n", SDL_GetError());

  6. }

  7. SDL_PauseAudio(0);

  8. while(true) {         <--- HERE

  9.    //SDL_Delay( 10 ) ;

  10. }

  11. return 0;


This "while" cause consuming 100% CPU.
daltomi
 
Posts: 12
Joined: Mon Apr 28, 2014 11:41 pm

Re: untz high CPU

Postby halfnelson » Tue Apr 29, 2014 4:39 am

if you uncomment out the delay(10) does it help?
halfnelson
 
Posts: 421
Joined: Wed Jun 13, 2012 9:48 pm

Re: untz high CPU

Postby daltomi » Tue Apr 29, 2014 6:52 am

Yes, consumption drops by 8 %.
But I also removed the segment "while" and all my testings performed well.
I think it is not even necessary.
daltomi
 
Posts: 12
Joined: Mon Apr 28, 2014 11:41 pm


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

x