SFML community forums

Help => Audio => Topic started by: HeapOfCode on December 20, 2015, 03:11:07 pm

Title: OpenAL Error in Soundbuffer.cpp Windows 10
Post by: HeapOfCode on December 20, 2015, 03:11:07 pm
Hello everyone, I  ran into issues by simply running :

#include <SFML/System.hpp>
#include <SFML/Audio.hpp>

int main()
{
    sf::Sound sound;

    sf::SoundBuffer buffer;

    buffer.loadFromFile("file.wav");

    sound.setBuffer(buffer);

    sound.play();
}

My command line is printing:

Quote
AL lib: (EE) DoReset: Failed to initialize audio client: 0x8889000a
Failed to create the audio context
An internal OpenAL call failed in SoundSource.cpp(37).
Expression:
   alGenSources(1, &m_source)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in SoundSource.cpp(38).
Expression:
   alSourcei(m_source, AL_BUFFER, 0)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in SoundBuffer.cpp(46).
Expression:
   alGenBuffers(1, &m_buffer)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

Failed to open sound file "HITMARKER.wav" (couldn't open stream)
An internal OpenAL call failed in Sound.cpp(104).
Expression:
   alSourcei(m_source, AL_BUFFER, m_buffer->m_buffer)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in Sound.cpp(73).
Expression:
   alSourcePlay(m_source)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in Sound.cpp(87).
Expression:
   alSourceStop(m_source)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in Sound.cpp(194).
Expression:
   alSourcei(m_source, AL_BUFFER, 0)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in Sound.cpp(87).
Expression:
   alSourceStop(m_source)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in SoundSource.cpp(60).
Expression:
   alSourcei(m_source, AL_BUFFER, 0)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

An internal OpenAL call failed in SoundSource.cpp(61).
Expression:
   alDeleteSources(1, &m_source)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

I use codeblocks gcc on windows10 with the 32bit sfml2.3.2. I already tried the other libs from the website without success  :-[. So I hope anyone has an idea of what might cause this.

Update:
I ran the program on a different pc (Win8.1) and found out the errors were caused by the last win10 update
Title: Re: OpenAL Error in Soundbuffer.cpp and others
Post by: eXpl0it3r on December 20, 2015, 03:14:46 pm
Do you use the OpenAL.dll that is shipped with SFML? Is your audio card/driver working?
Title: Re: OpenAL Error in Soundbuffer.cpp and others
Post by: HeapOfCode on December 20, 2015, 03:22:39 pm
Yes, I put it next to the executable otherwise Id get a pop up saying that its missing  :P
Title: Re: OpenAL Error in Soundbuffer.cpp Windows 10
Post by: eXpl0it3r on December 20, 2015, 05:56:44 pm
Make sure to disable Windows 10's feature for driver updates, then go to your audio card vendor's website and download the official driver and install these again.
Title: Re: OpenAL Error in Soundbuffer.cpp Windows 10
Post by: HeapOfCode on December 20, 2015, 08:19:45 pm
Yep that fixed it, thanks a lot  ;D ,never mind the auto updates
Title: OpenAL Error in Soundbuffer.cpp Windows 10
Post by: eXpl0it3r on December 21, 2015, 01:40:18 am
I had Win 10 reinstall some incompatible GPU drivers three times, so I know how annoying these driver auto "updates" can be.