I'm not sure if this is on my end or not. I'm using static-linked SFML 2.2, VC 2012, 64-bit Windows.
This works:
int main() {
sf::SoundBuffer buffer;
sf::Sound sound;
buffer.loadFromFile("foo.wav");
sound.setBuffer(buffer);
sound.play();
return 0;
}
But this doesn't:
int main() {
sf::Sound sound;
sf::SoundBuffer buffer;
buffer.loadFromFile("foo.wav");
sound.setBuffer(buffer);
sound.play();
return 0;
}
Specifically, declaring the sf::Sound before the sf::SoundBuffer it uses causes a crash and references XTree and some iterator error. The crash happens during the SoundBuffer destructor. This is new to me in 2.2 and wasn't the case in 2.1 stable.
Is this intended behavior?