Hi guys,
First thanks SFML, I just tried it for the first time and it works so easily!
In my Qt project, all my sounds are mapped to resources,
I would like to play the sound from the resource instead of from the hard drive.
I can play the sound fine when I load from the disk, however, is there a way to use the ressource syntax to load a sound?
Thanks in advance!
if (!buffer.loadFromFile(":/sound/resume")) {
qDebug() << "cant play";
return 0;
}
// if (!buffer.loadFromFile("C:\\Dropbox\\PowerVelo2\\sound\\CadenceTooHigh.wav")) {
// qDebug() << "cant play";
// return 0;
// }
sf::Sound sound(buffer);
sound.play();
I suspect I may have to use "loadFromMemory" as the file should be in memory (it is inside the .exe)