Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 20a569ce84
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (25 sloc) 0.561 kb
#include <iostream>
#include <string>
#include <fstream>
// Load SFML Audio header
#include <SFML/Audio.hpp>
int main(int argc, char *argv[])
{
if (argc != 2)
{
std::cout << "Audio Test 1.0" << std::endl;
std::cout << "Usage is: audio_test <file>" << std::endl;
} else {
std::string song = argv[1];
sf::Music Music;
if (!Music.OpenFromFile(song))
{
return (-1);
}
Music.Play();
std::cout << "Now playing " << song << std::endl;
std::cout << "Hit [ENTER] to exit program" << std::endl;
std::cin.ignore().get();
}
return (0);
}
Jump to Line
Something went wrong with that request. Please try again.