-
Notifications
You must be signed in to change notification settings - Fork 81
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
Audio System Improvements #596
Conversation
89a377d
to
f217c30
Compare
This is ready for playtime! |
This has been rebased to facilitate review. |
Updated the PR text due to the release of OpenAL Soft 1.20. |
Rebased after merge of #612. |
Looks like the rebased version needs a |
I seem to have messed up the rebase and gained an extra definition for |
rebased to fix chaos from astyling and variadic plStatusLog |
Looks like the linux CI failure is a github bug, not a necessarily a problem with this PR? |
Rebased to fix the linux-ci issue and bring in the scripts portion. |
That's acceptable to me. |
This effectively rewrites the audio system init process to utilize the ALC_ENUMERATE_ALL_EXT such that all available audio endpoints can be selected as playback devices. Furthermore, this strips out support for hardware audio devices, which went the way of the dodo as of Windows Vista.
None of that crap is virtual, fool.
08a8df1
to
9133f4d
Compare
This is needed due to ALSoft changing the delcaration of ALCdevice and ALCcontext to no longer match the Creative OpenAL SDK. It is also helpful in that plAudioSystem.h is now much lighter weight so changes to the ASYS are less likely to induce rebuilds of many units.
Previously, the "My Voice" control in the options GUI did nothing. The old plWinMicLevel code was originally for the WinMM library from 1991 (!!!). This rewrites all that junk to use the Windows Core Audio library upon which WinMM sits as of Windows Vista. When using OpenAL Soft, the primary backend is WASAPI, a Core Audio component. Further, when adjusting the level in Uru, you can observe the level changing in the Windows mixer as well.
Due to limited space in the options GUI, I was already needing to do this in the Python code. Now that we need it in C++ for CoreAudio, it's best to rely only on a single implementation.
This fixes the issue in which trying to build a debug client would fail with compile errors on MSVC due to mismatched iterator debug levels.
Removed unused file and fixed a few would-be compile errors in ifdef'd code as pointed out in review. |
💥 |
This adds flexibility to the audio system by allowing any endpoint available to OpenAL for both playback and capture. This should fix several assumptions that prevented OpenAL Soft from working properly as well. Additionally, the broken "My Voice" slider in the audio options dialog has been fixed by rewriting the
plWinMicLevel
class to target Windows Core Audio.In my testing, MOULa ships with an oddball OpenAL32.dll that does not support the
ALC_ENUMERATE_ALL_EXT
, so only the default playback endpoint is available. Also, there appears to be a bug in the Creative OpenAL implementation that causes an access violation when accessing theITaskbarList3
pointer after changing the playback device. OpenAL Soft does not display this bug.Finally, OpenAL Soft 1.19.1 appears to have an issue in its WASAPI backend that causes audio capturing at any sampling rate other than 44.1kHz to have discernible distortion. This issue is not present in OpenAL Soft master and can be worked around in 1.19.1 by disabling the WASAPI backend in favor of the DirectSound or WinMM backend. Since Windows Vista, DirectSound and WinMM are just layers on top of Windows Core Audio WASAPI, so this is effectively bypassing an AL Soft issue.This depends on H-uru/moul-scripts#111.