SFML community forums

Help => Audio => Topic started by: Tytan on December 02, 2016, 09:17:47 am

Title: Possible bug in sf::sound
Post by: Tytan on December 02, 2016, 09:17:47 am
So, I have a average game, with networking audio, and graphics, I start the game for another round of debugging, and see this in the console window:
AL lib: (EE) MMDevApiOpenPlayback: Device init failed: 0x80004005
Failed to open the audio device
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.

An internal OpenAL call failed in SoundBuffer.cpp(265).
Expression:
   alBufferData(m_buffer, format, &m_samples[0], size, sampleRate)
Error description:
   AL_INVALID_OPERATION
   The specified operation is not allowed in the current state.

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 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.

 

Not quite sure if you need the source code for my game, or what this means, is it a bug I have to deal with? xD
Title: Re: Possible bug in sf::sound
Post by: eXpl0it3r on December 02, 2016, 09:39:03 am
It means that OpenAL can't open the audio device. This can have multiple reasons, quite common is that they driver is not installed or is buggy. Or that some application has take exclusive access to the audio device.

Try to play back some sound through another application. Check your running applications and if you can't find anything, try rebooting your system to reload all drivers.
Title: Re: Possible bug in sf::sound
Post by: Tytan on December 02, 2016, 09:51:32 am
Thank god! Though it was something to do with my code xD

Thanks :)