OpenAL enabled Windows build

Hello everyone, I have a Sound Blaster X-Fi Titanium on my PC and as most people know it has hardware acceleration when using the OpenAL backend on Windows. As it is disabled by default and I wanted to use it in the hopes of having the least amount of sound latency and CPU usage possible I compiled a version of the master branch with it enabled. It is 64-bit only, if anyone needs a 32-bit version just tell me. I also plan to disable the resampling to 48 kHz (or whatever rate it is set) so the sound card can resample what the core is outputting with its hardware. Right now you can just change the rate on the config file to approximate to the one used by the core. Pitch shifting would still be done through the CPU as the X-Fi pitch shifter is mono-only and of low quality.

On my Pentium G3220 with a nVidia 750 Ti I can play SNES with 32 ms of latency with no shaders, 48 ms with tv-out+3-phase-composite+interlacing and hard sync enabled on my CRT with a resolution of 640x480. With xAudio I can use 32 ms on both, but with OpenAL it feels lower… Probably something from my head, but who knows? I have no way to test it.

I also updated the default libopenal to the newest OpenAL Soft, which has a very high quality band limited sinc resample algorithm and can output sound through WASAPI just like xAudio.

How to use: RetroArch crashes when using Creative’s OpenAL proxy, so anyone who wants to use this with a X-Fi must copy the “ct_oal.dll” from “C:/Windows/System32/” to the RetroArch folder, delete “libopenal-1.dll” and then rename “ct_oal.dll” to “libopenal-1.dll”. This will force RetroArch to use Creative’s OpenAL hardware X-Fi renderer.

You can download it here: https://mega.nz/#!M4cVBKzC!QxaTeq_3i_Wzy0YwJOvLpCCaIE2Ny4A5_2bsDlaOEVI

For the devs: Would it be possible to enable OpenAL on the official Windows builds?

1 Like

Thx! Could you please update your OpenAL Version to the newest nightly?

Almost one year after my first post… Now not only I compiled with OpenAL support but also added a little workaround for a bug when using streaming buffers on a Creative X-Fi.

You can download it here: https://mega.nz/#!B11hmZKJ!QOn6Ionwm7VFYp-mr9lxU7tR3lcxUaCDOyMTv04kPKY

This build also includes the newest OpenAL Soft as of this post, 1.18.0.

For those interested in the bug: Sometimes the X-Fi seems to forget to tell that a buffer was already processed and this locks the buffering logic on RetroArch as it depends on knowing how many buffers were played. Everything gets back to normal if the audio is paused (press F1 to go to the menu) and then unpaused. Now it does that automatically when a lock is detected.

For those interested in my patch:

If you have any suggestion on a better workaround, please share.

Can you make a similar solution to implement openAL-soft into iOS?