Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SoundStream::play to restart the sound if it was played before #2175

Merged
merged 1 commit into from Aug 3, 2022

Conversation

kimci86
Copy link
Contributor

@kimci86 kimci86 commented Aug 2, 2022

Description

This is similar to the fix I contributed in #2037 for master branch but this time for 2.6.x branch. I did not realize at first a part of the bug was also present in 2.6.x branch.

The bug is that calling SoundStream::play after the sound was played in full a first time does not restart the sound. The expected behavior according to this method documentation is to restart the sound.

The fix is a little different from #2037 because we use sf::Thread which does not provide a joinable method like std::thread does in master.

Tasks

  • Tested on Linux
  • Tested on Windows
  • Tested on macOS
  • Tested on iOS
  • Tested on Android

How to test this PR?

Running the voip example program.

@eXpl0it3r eXpl0it3r added this to Discussion in SFML 2.6.0 via automation Aug 2, 2022
@eXpl0it3r eXpl0it3r added this to the 2.6 milestone Aug 2, 2022
@eXpl0it3r eXpl0it3r moved this from Discussion to Review & Testing in SFML 2.6.0 Aug 2, 2022
@oomek
Copy link
Contributor

oomek commented Aug 3, 2022

Thanks for fixing that. I confirm that the behavior of the sf::Soundstream::play() function now conforms to the documentation.

SFML 2.6.0 automation moved this from Review & Testing to Ready Aug 3, 2022
@eXpl0it3r eXpl0it3r merged commit 80ed37c into SFML:2.6.x Aug 3, 2022
SFML 2.6.0 automation moved this from Ready to Done Aug 3, 2022
@eXpl0it3r
Copy link
Member

Thanks for back porting this! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SFML 2.6.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants