Skip to content

Fix: Sound effects keep playing when loading another save #23844

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

Merged
merged 1 commit into from
Mar 1, 2025
Merged

Fix: Sound effects keep playing when loading another save #23844

merged 1 commit into from
Mar 1, 2025

Conversation

matheusvb3
Copy link
Contributor

@matheusvb3 matheusvb3 commented Feb 17, 2025

This is a fix for a small issue that can occur on the title screen. When the loading window pops up, the game logic stops being updated and looping sounds repeat until the the window closes, which sounds a little weird.

issue.mp4
issue2.mp4

@matheusvb3
Copy link
Contributor Author

matheusvb3 commented Feb 17, 2025

Something else I noticed, maybe we could replace these calls to StopAll() in SavePrompt.cpp and LoadSave.cpp with Pause()?


if (NetworkGetMode() == NETWORK_MODE_NONE)
{
    gGamePaused |= GAME_PAUSED_MODAL;
    Audio::StopAll();
}
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE)
{
    gGamePaused |= GAME_PAUSED_MODAL;
    Audio::StopAll();
}

In both cases the audio gets restored with a call to Resume, so it seems more appropriate:

// Unpause the game if not on title scene, nor in network play.
if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE)
{
    gGamePaused &= ~GAME_PAUSED_MODAL;
    Audio::Resume();
}

Edit: it causes the UI button click sounds to stop working so not a good idea after all

Copy link
Member

@ZehMatt ZehMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look alright.

@Gymnasiast Gymnasiast added the testing required PR needs to be tested before it is merged. label Feb 18, 2025
@AaronVanGeffen AaronVanGeffen added the squash merge A PR that should be squashed on merge. label Mar 1, 2025
@Gymnasiast Gymnasiast changed the title Mute sound effects when loading window pops up Fix: Sound effects keep playing when loading another save Mar 1, 2025
@Gymnasiast Gymnasiast enabled auto-merge (squash) March 1, 2025 18:45
@Gymnasiast Gymnasiast merged commit fab5005 into OpenRCT2:develop Mar 1, 2025
24 checks passed
@matheusvb3 matheusvb3 deleted the title-change-mute branch March 2, 2025 23:31
@Gymnasiast Gymnasiast added this to the v0.4.21 milestone Mar 20, 2025
Gymnasiast added a commit that referenced this pull request Apr 5, 2025
- Feature: [#22646] New scenario files now contain a minimap image, shown in the scenario selection window.
- Feature: [#23774] Climates can now be customised using objects.
- Feature: [#23876] New park save files now contain a preview image, shown in the load/save window.
- Improved: [#24078] Handrails on Wooden Roller Coaster station sprites with no platforms have been removed.
- Improved: [objects#379] Add additional colour schemes to Mine Train.
- Change: [#23932] The land rights window now checks “Land Owned” by default.
- Change: [#23936] The ‘guests prefer less/more intense rides’ settings have been turned into a dropdown.
- Change: [#24059] The ‘select other ride’ button is now available in the track designs manager.
- Change: [#24067] [Plugin] Registered menu items are now listed alphabetically.
- Change: [#24070] Footpath selection menus now show object names on hover using a tooltip.
- Change: [#24101] Frozen peeps are no longer removed when using the 'remove all guests' cheat.
- Fix: [#4225] Ride Construction window offers non-existent banked sloped to level curve (original bug).
- Fix: [#5281] Missing supports on miniature railways built backwards.
- Fix: [#7222] Transparent pixels in sloped path tunnels (original bug).
- Fix: [#10379] Banners outside the park can be renamed and modified (original bug).
- Fix: [#10582] Low clearance tunnels below water are drawn incorrectly (original bug).
- Fix: [#17524, #23710] Station bases are drawn on many ride types when the “No entrance, no platform station” style is selected.
- Fix: [#18169] CJK, Arabic and Vietnamese display all text as ‘???’ on Android.
- Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on.
- Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path.
- Fix: [#21803] The park fence is drawn differently in OpenGL compared to software rendering when zoomed out.
- Fix: [#21824] Some sprites are drawn incorrectly when zoomed out in OpenGL rendering.
- Fix: [#21908] Ride mode warnings when hovering track designs.
- Fix: [#22820] OpenGL does not draw masked sprites correctly.
- Fix: [#22961] Clicking on the construction preview places duplicate flat rides and stalls.
- Fix: [#23359] Scripting: Add car.moveToTrack, an easier API than setting car.trackLocation directly.
- Fix: [#23443] New GOG version of RCT2 is not extracted correctly.
- Fix: [#23484] Stray coloured pixels on castle-themed stations and Roman-themed entrances/exits (original bug).
- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey.
- Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list.
- Fix: [#23844] Sound effects keep playing when loading another save.
- Fix: [#23881] Compiling on Raspbian/arm-linux-gnueabihf fails.
- Fix: [#23891] Inverted Hairpin Coaster track can draw over things above it (original bug).
- Fix: [#23892] Gentle banked Wooden Roller Coaster track glitches as trains pass (original bug).
- Fix: [#23897] Reverse Freefall Coaster slope up to vertical track piece does not draw a vertical tunnel.
- Fix: [#23910] Heartline Twister Coaster track can draw over things above it (original bug).
- Fix: [#23939] Incorrect assertion when trying to load heightmap.
- Fix: [#23941] Underflow in “Repay loan and achieve a certain park value” objective when using Japanese.
- Fix: [#23949] Walls draw over sloped rear water edges and those edge sprites are misaligned (original bug).
- Fix: [#23960] Corner path fences can draw over adjacent sloped land (original bug).
- Fix: [#23961] Lamps and queue line tvs draw incorrectly on paths with fences.
- Fix: [#23983] Ordering files by size does not work and occasionally crashes the game.
- Fix: [#24009] [Plugin] The object manager API does not identify recently introduced object types.
- Fix: [#24028] Giga and LSM Launched Coaster booster sprites have pixels that draw over transparent pixels.
- Fix: [#24077] Track Designer crashes when clicking the park fence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squash merge A PR that should be squashed on merge. testing required PR needs to be tested before it is merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants