Created
July 14, 2012 21:16
-
-
Save ngscheurich/3113400 to your computer and use it in GitHub Desktop.
Play audio using SFML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @library SFML 2.0 RC | |
// Load the sound file | |
sf::Music sound; | |
if (!sound.openFromFile("soundfile.ogg")) { | |
return EXIT_FAILURE; | |
} | |
// Play the sound | |
sound.play(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment