SFML community forums

Help => Audio => Topic started by: Kuliu on November 02, 2020, 10:03:57 am

Title: Failed to open audio device (AL_INVALID_OPERATION)
Post by: Kuliu on November 02, 2020, 10:03:57 am
When trying to load a sound from file it successfully loads then spams the output with

(click to show/hide)

This is the simple test code I'm running
           
int main() {
    sf::SoundBuffer test { };
    if (test.loadFromFile("explosion.ogg")) {
        sf::Sound test_sound { test };
        test_sound.play();
    }
}
 

Also note I'm running on Ubuntu 20.04.1 LTS using pulseaudio
I uninstalled pulseaudio and reinstalled it but the issue continues.
This problem doesnt occur when this is built out on windows so I'm not entirely sure what the issue is.
Title: Re: Failed to open audio device (AL_INVALID_OPERATION)
Post by: Kuliu on November 03, 2020, 08:47:25 am
After further inspection the issues occurs before the sound buffer is even loaded. Just created a sf::SoundBuffer period is the issue for me.
Title: Re: Failed to open audio device (AL_INVALID_OPERATION)
Post by: Kuliu on November 03, 2020, 06:32:52 pm
I found the issue, but I need help! It turns out the problem was CLion the IDE I'm using. For whatever reason when the program is ran inside of CLion the console is filled with openal errors, but when run from the terminal it works perfectly fine. Does anyone know which setting in an IDE could cause this issue?
Title: Re: Failed to open audio device (AL_INVALID_OPERATION)
Post by: eXpl0it3r on November 11, 2020, 01:45:12 pm
Mabye when you run it from within CLion it picks up a different OpenAL DLL than the one you actually provide, so you might end up with an OpenAL version that's somewhere installed on your system, but not actually compatible with SFML.