kohi icon indicating copy to clipboard operation
kohi copied to clipboard

[BUG] OpenAL error 40964 AL_INVALID_OPERATION

Open vanlueckn opened this issue 1 year ago • 2 comments

Describe the bug I tried to use the new audio plugin (openal). On my system i get this error:

[ERROR]: OpenAL error 40964: 'AL_INVALID_OPERATION'
[INFO]: OpenAL Device acquired.
[ERROR]: OpenAL error 40964: 'AL_INVALID_OPERATION'

To Reproduce Steps to reproduce the behavior:

  1. Compile Kohi
  2. Run Kohi
  3. See error in log

Expected behavior Audio plugin should not throw this error

Screenshots image

Desktop (please complete the following information):

  • OS: arch linux (rolling release)

Additional context

I debugged the audio plugin with a few breakpoints. The first error is issued by plugin->internal_state->device = alcOpenDevice(0);.

vanlueckn avatar Jan 04 '24 12:01 vanlueckn

In the official example openal does not check for errors before creating the context (OpenAL Programmers Guide - see page 10.

The alGetError function of openal-soft seems to set error to AL_INVALID_OPERATION if no context was selected. OpenAL Soft is the standard openal implementation in many linux distros, this explains why the error does only appear on my system.

vanlueckn avatar Jan 04 '24 12:01 vanlueckn

@vanlueckn Thanks for submitting this!

Catching up on issues - apologies for the delay! I've known about this for a while. It doesn't affect the operation of the sound, so it hasn't been a priority to fix. It is on my list to revisit though.

travisvroman avatar Jul 21 '24 00:07 travisvroman