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

Fixed several problems with the sound system #1569

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Fixed several problems with the sound system #1569

merged 1 commit into from
Nov 5, 2020

Conversation

Semphriss
Copy link
Member

Fixes #1555

This PR fixes no less than four problems I found with the sound system:

  • A heavy coin hitting a wall from below or from the right will now only play sound when at the same speed required for hitting to the left or from above (a. k. a., fixed handling of negative values)
  • Coins stuck in solid matter will no longer request to play a sound every single frame.
  • A sound failing to pause will no longer throw the error back to the main game loop, resulting in an unexpected crash. It will rather be handled on the spot, just like playing, stopping or resuming.
  • Oppositely, a sound that fails to be created will no longer silently catch the error and continue the execution normally, but instead will force the caller to handle the error and, as one can logically assume, will not store the audio for further manipulations.

I really need to do that code cleanup, I think.

…explosion bonus block placed below thick solid matter would flood the sound system with coin boucing sounds and would end up crashing)
@serano01 serano01 merged commit 916f8bc into SuperTux:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A coin explosion box stuck to a ceiling will blow up the sound manager (OOM error)
2 participants