Hi all,
I'm struggling with trying to play music from my console, and I am not sure what the problem is. This is the current code:
#include <iostream>
#include <string>
#include <SFML/Audio/Music.hpp>
int main(int argc, char* argv[])
{
sf::Music music;
if (!music.openFromFile("recit24bit.flac"))
{
std::cout << "Error" << std::endl;
return -1;
}
music.play();
return 0;
}
I compile the file like so: g++ main.cpp -o music-app -lsfml-audio -lsfml-system
The flac file plays on my media player, so I'm not sure what the problem is, and it's located in the same directory as the executable.
I'm using g++ 4.8.4, ubuntu 14.04 LTS, and I downloaded the SMFL package through the debian package handler.
Thanks