Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This can be used to benchmark the (GP) DSP.
Example output:
Settings
frames:
We only run every 15th APU frame, so if you want to batch all frames, you must set
frames = 15
. If frames is any less, we can't produce stable audio output.For measuring performance, only doing every 15th frame is fine.
cycles:
Running 40000 cycles should be enough for some games, but the real DSP will run around 106k (probably). The more we can do, the better.
22000 cycles should be enough to finish a single APU frame in DirectSound.
1000 cycles is what XQEMU master revision uses.
If you keep increasing this value, you might see a performance improvement at some point.
That is because the DSP will be stuck on a simple loop instruction which is computationally less expensive than some others (= lower CPU usage / faster). If you pick a lower value the DSP might still be busy doing more complicated tasks when hitting the limit (= high CPU usage / slower).
There's certain combinations where the Xbox will refuse to boot. Either because the host CPU is busy and won't find time to update the UI, or because something in the DSP went wrong as it was spammed by frames / lacked frames.
It's also possible that there's bugs in our DSP which affect this test.
How to interpret the output
(ns = nanoseconds)
tl;dr: Make sure {C} is tiny, to verify timing works, optimize so {E} reaches 100%