6
« on: June 27, 2009, 01:44:09 am »
I recently found SFML and have been going through the tutorials. However, while playing with the graphics package, my programs began beeping mysteriously, etc.. Here is the snippet that causes the crash (I commented other segments, such as event handling, out):
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800,600,32), "Test");
App.SetFramerateLimit(30);
sf::Image Image;
if(!Image.LoadFromFile("player.png")) //this line causes strange beeping issues
{
Image.Create(20,40,sf::Color(150,250,255,255));
}
return EXIT_SUCCESS;
}
As the comment states, trying to load an image from a file causes a strange beeping that always comes out through my speakers, regardless of whether I muted them or whether I have my headphones in the computer; it's a nuisance that I cannot seem to avoid. Also, when I remove trying to load an image, and just create one myself, VC++'s debug states that the stack around the RenderWindow is corrupt; trying to ignore that error causes the program to stop working. Does anyone know how to resolve these issues? Thanks in advance.