Greetings SFML users. Ill get right to where the cookie crumbles.
I have made a function which plays a sound file in my resources map.
void MusicFunctions::playMusic(MusicFunctions &other)const
{
// std::cout << other.songs[1].getSongTitle();
string playeble = resourcePath() + other.songsInPlaylist[1].getSongTitle();
std::cout << playeble;
other.openFromFile(playeble);
other.play();
}
songsInPlaylist is a vector which contains the class Song.
So as I'm trying to play the sound file(which in this case is called "02 song2.flac".
But when i do try to play it it gives me this error:
Failed to open sound file "/Users/xxxxx/Library/Developer/Xcode/DerivedData/MusicPlayer-beqmpaqteyhiekdpwwslfglinhbk/Build/Products/Debug/MusicPlayer.app/Contents/Resources/02 song2.flac
" (System error : No such file or directory.).
I have tried to print out the path where the file is and comparing them, and they are identical.
What should I do?
/N0iZE