Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added X-Fi check and convert surround FLOAT to SHORT when it is detected #3024

Merged
merged 1 commit into from Sep 12, 2015

Conversation

LAGonauta
Copy link
Contributor

Follow up from https://bugs.dolphin-emu.org/issues/8711

The OpenAL backend wasn't working on hardware based OpenAL cards (basically only the X-Fi), stereo mode generated buffer queue errors and never played anything, and surround mode was very loud with lots of clipping.
This happens because the X-Fi doesn't support float point operation, only fixed point (even though the drivers reports that it supports).
I added a check to detect a X-Fi, and when it does it converts float to short.
Stereo is perfect now (I used the code that was already there), but for some reason on surround there is some clipping (and this clipping happens even if I force short mode with OpenAL Soft).
I couldn't find why this happens, sadly, but now it is usable.

@@ -146,18 +146,39 @@ void OpenALStream::SoundLoop()
memset(uiBuffers, 0, numBuffers * sizeof(ALuint));
uiSource = 0;

// Checks if a X-Fi is being used. If it is, disable FLOAT32 support.

This comment was marked as off-topic.

Fixed braces, first try fixing mac compilation and removed useless NULL
comparison.
@phire
Copy link
Member

phire commented Sep 12, 2015

The driver does what?

LGTM

Sonicadvance1 added a commit that referenced this pull request Sep 12, 2015
Added X-Fi check and convert surround FLOAT to SHORT when it is detected
@Sonicadvance1 Sonicadvance1 merged commit 4d5baa4 into dolphin-emu:master Sep 12, 2015
@LAGonauta
Copy link
Contributor Author

The X-Fi doesn't support floating point buffers, but the driver reports that the X-Fi has support for them. Sorry, I am not a native speaker and have some problems expressing myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants