I have checked it.
C:\Users\Brukmoon\Documents\Visual Studio 2010\Projects\SFML\Release
Which is wrong, unless you've changed it manually in the project settings.
The default working directory with Visual Studio is next to the project file, in your case I'd say you'll have to put all the resources into the following directory:
C:\Users\Brukmoon\Documents\Visual Studio 2010\Projects\SFML
What does the console output say?
As I've stated before the application compiles and links well, no errors/warning at all, build successful. It just won't open the file even thought it should.
I wasn't talking about the compiler out here, I referred to the console output by the application. When the loading fails, then you'll always get a debug output on std::err, which will tell you what exactly went wrong. In your case it would probably state that the audio file couldn't have been found.
For example with the following code, your application doesn't just simply close when the loading fails, but it waits for 5 seconds, so you'd be able to read the error message.
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(sf::VideoMode::getDesktopMode()), "SFML");
sf::SoundBuffer buffer;
if (!buffer.loadFromFile("mainMusic.wav"))
{
std::cout << "Error while loading music" << std::endl;
sf::sleep(sf::seconds(5));
return -1;
}
sf::Sound sound;
sound.setBuffer(buffer);
sound.play();
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
}
}
Btw. you should always post code with the tag code=cpp.