Hello,
I am currently working on a game project using SFML 1.6 and Visual Studio 2008, and it seems sf::Window.Display() is causing a high-pitched background noise. Console applications work just fine with no noise, as well as the other SFML classes/functions.
If I just create a window without invoking Display, again no noise is present. Only when I add a App.Display() invocation to the main game loop this high-pitched noise appears. Here is the code producing the noise:
#include <iostream>
#include <SFML/Window.hpp>
int main (){
sf::Window App(sf::VideoMode(640, 480, 32), "Testits");
sf::Event Main_Event;
while(App.IsOpened()){
while(App.GetEvent(Main_Event)){
if(Main_Event.Type == sf::Event::Closed){
App.Close();
}
}
App.Display();
}
return 0;
}
I tried looking up this issue on Google, but it seems only post on was made mentioning this problem. Unfortunately the poster asked several questions in his one post and thus received only one answer for one of the other issues he had.