I am basically using this code and unlegacying it a little:
https://github.com/hansiC/sfml-soundfileReader-example
Most important changes concern the swap sf::music for sf::Sound as follows in the main routine:
std::shared_ptr<sf::Sound> m_soundSource = std::make_shared<sf::Sound>();
std::shared_ptr<sf::SoundBuffer> m_soundBuffer = std::make_shared<sf::SoundBuffer>();
if (!m_soundBuffer->loadFromFile(filename)) {
...
}
m_soundSource->setBuffer(*m_soundBuffer);
m_soundSource->setVolume(0.8f);
and later in the loop:
togglePlayPause(*m_soundSource);
Best regards and thanks alot for your assistance!
Andy