Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - N0iZE

Pages: [1]
1
Audio / Problem opening sound file
« on: March 07, 2015, 09:43:27 pm »
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

Pages: [1]