The closest thing that I could find that already mentioned this error is
this post but since the error I'm getting is in SFML 2.3 but not 2.2, I don't think that topic is relevant - barring the fact that it didn't seem that the problem in the thread had a solution.
The actual error I'm receiving is:
An internal OpenAL call failed in AudioDevice.cpp (157) : AL_INVALID_OPERATION, the specified operation is not allowed in the current state
#include <SFML/Audio.hpp>
int main()
{
sf::Listener::setGlobalVolume(100.f);
return EXIT_SUCCESS;
}
That code is enough for me to get the error. It doesn't get an error by instancing an sf::Sound object (like in
this SFML Github issue that I visited to see if it was related) instead of using the Listener. In fact, after some extra tests while writing this, I found that of the setters in Listener, setGlobalVolume() and setPosition() causes the error but setDirection() and setUpVector() do not.
I've fully linked to 2.3 and it causes this error. I then fully linked to 2.2 and there is no error.
I then tried 2.3 with 2.2's Audio dll and the error disappears. 2.2 with 2.3's Audio dll brings it back.
Both versions of the SFML DLLs are the release versions.
Indeed, the reason I noticed this was because I linked my Faux Car project to 2.3 and it caused this error at the very beginning (when setting global volume) and then I had some weird destruction crash when main() closed. I've found the source of the crashing so they're not related as I originally considered. I addressed this first (the audio error) as it's the first error and I found it easy to reproduce with minimal code.
EDIT: This error is only appearing in debug mode, not release.
Windows 7 64-bit, VS Studio 2013, SFML 32-bit - dynamic and static both same result.
EDIT 2:
64-bit gives same result as 32-bit (debug, not release; both dynamic and static same result).