Hi all,
Played around with this quite a lot and I'm sure the problem is on my end. I'm doing something very simple at the moment.
int main()
{
sf::SoundBuffer soundBuffer;
soundBuffer.loadFromFile("ball.wav");
sf::Sound soundToPlay(soundBuffer);
soundToPlay.setLoop(true);
soundToPlay.play();
}
I never get a sound. When I close the application, I receive an "Unhandled exception at 0x77b715de in myGameIsGod.exe: 0xC0000005: Access violation reading location 0xfeeefeee." If I click break, it takes me to
AudioDevice::~AudioDevice()
{
// Destroy the context
alcMakeContextCurrent(NULL);
if (audioContext)
alcDestroyContext(audioContext);
// Destroy the device
if (audioDevice)
alcCloseDevice(audioDevice);
}
The break occurs at alcCloseDevice(audioDevice).
I'm using VS2010 and SFML2.0. If I take out the sound part, there are no issues. If I leave the code in, but prevent the sound from happening, there are no issues. I have openal32 and libsndfile-1 in my project folder. I have sfml-audio-d-2.dll in my project folder and sfml-audio-d.lib linked.
The one part I'm not sure of is that I have to use the x86 openal32 and libsndfile-1 even though I'm on a 64-bit system. If I use the 64-bit ones, I receive an "unable to start application" message.
Also, I tried redownloading openal32 and libsndfile-1 as part of the sfml 2.0 snapshot, no luck. I also recompiled the libraries with nmake, no luck again.
Any thoughts on what I'm doing wrong? Let me know if you need more information.