The OpenAL code frequently uses qalGetError() to test if a previously executed function failed: however, if it succeeded, but a function called earlier failed, then an error is still reported: at best this will result in an erroneous message, but in some cases the code will fall back on defaults unnecessarily.
Wrapping every function call that might give an error (but in real use probably won't) is time-consuming and difficult, so instead I propose the following to ensure the error state is cleared before execution of the function to be tested. When called with qtrue, it simply eats the error; if called with qfalse (as it is in every case included here) it prints a diagnostic message warning that an unhandled error was found.
The two specific bugs which led me to discover this problem I will submit in separate reports.
Created attachment 1862 [details] addition and use of S_AL_ClearError