Warning: Undefined array key "useheading" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parser/xhtml.php on line 1099 Warning: Undefined array key "target" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parser/xhtml.php on line 557 Warning: Trying to access array offset on value of type null in /home/rockbox/flyspray/plugins/dokuwiki/inc/parser/xhtml.php on line 557 FS#5748 : Fix Skipping Audio in Simulator on OS X (caused by excessive surface blitting in SDL)

Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category User Interface → Simulator
  • Assigned To
    safetydan
  • Operating System All players
  • Severity Critical
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by ezephir - 2006-07-31

FS#5748 - Fix Skipping Audio in Simulator on OS X (caused by excessive surface blitting in SDL)

The SDL simulator on OS X when compiled skips while playing audio. The message reported is:

sdl_audio_callback: No Data.

Upon investigation, this behaviour only occurs when the simulator window was visible. Upon closer investigation, the Simulator draws to the screen twice, once with SDL_UpdateRect() and again with SDL_Flip(). According to the SDL Documentation (www.libsdl.org/cgi/docwiki.cgi/SDL_5fFlip), SDL_Flip is equivalent to updating the whole screen with SDL_UpdateRect().

When hardware aceleration is available, SDL_UpdateRect() AFAIK is bad when double buffering is used because the backbuffer is a frame behind the current LCD display. If only a region of it is updated, as the original code did, the output will contain a mixture of the new LCD and the one a frame before it.

Because of the incorrect behavior when the program is double buffered, and the redundancy that keeps the OS X version of the simulator, I removed the call to SDL_UpdateRect(). The program output seems to still be correct, and the OS X version no longer skips on any of the computers I’ve tested on.

Closed by  bluebrother
2006-07-31 16:34
Reason for closing:  Accepted

I’ve tried this patch under Linux and it doesn’t seem to make any difference. I’ll investigate some more though.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing