| Summary: | Performance locked to ~28FPS with SDL 2.0.9 | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Misty De Meo <mistydemeo> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.9 | ||
| Hardware: | x86_64 | ||
| OS: | Mac OS X (All) | ||
|
Description
Misty De Meo
2019-01-30 17:12:19 UTC
Just wanted to check in on this again! I work on the Homebrew package manager for macOS. I'm considering creating a patch to revert ffd52bb02bcc in our SDL package, since we also package Mednafen. Do you anticipate any negative consequences of doing that? Ryan, how would a coreaudio patch lock framerate? (In reply to Sam Lantinga from comment #2) > Ryan, how would a coreaudio patch lock framerate? I don't know, but this is on my must-fix list for 2.0.10. My thinking is that the audio thread creates its own RunLoop to support CoreAudio, and this is causing either a huge CPU load because we're doing something wrong, or it's doing something that causes the main thread's RunLoop to synchronize. I'm looking into it, probably on Monday. --ryan. Ah, I figured it out. In Mednafen's use-case, we accidentally drop audio buffers, which causes the audio callback to fire less, which causes Mednafen framerate to drop, since it only progresses when it can generate more audio. I'll fix this tonight. --ryan. I ended up backing out the change, which doesn't make me happy, but trying to shoehorn what CoreAudio wants into what SDL wants is just simply less efficient and increases latency, so for now this will have to do. :/ I'll revisit this after 2.0.10 ships, to see if there's a better way to make everything coexist. The backout commit is https://hg.libsdl.org/SDL/rev/dcb6c57df2fc and should resolve this bug. --ryan. |