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

Sound fixes #3716

Merged
merged 9 commits into from
Mar 31, 2024
Merged

Sound fixes #3716

merged 9 commits into from
Mar 31, 2024

Conversation

KJeff01
Copy link
Member

@KJeff01 KJeff01 commented Mar 29, 2024

  • Fixed generator power hum appearing while loading saves and disappearing after coming back onto the home map (put it in effects). I turned it into a one-shot sound so it doesn't need a special function to stop it, and this also prevents an ancient issue where deconstructing the power-generator still had this sound looping as it was being demolished.
  • Prevent Oil derrick pump sound from persisting onto offworld maps where they would be on the home map.
  • Fixed audio pause state never being set, add a few more (hopefully not problematic).
  • Cleanup.
  • Rename some confusing function names.

KJeff01 added 3 commits March 30, 2024 15:18
Prevents this sound from appearing mid-saveload if the camera is positioned near a generator.
Also fixes the hum sound disappearing after coming back from an away mission.

Made this a "one-shot" sound so it does not need an explicit `audio_StopObjTrack()` to stop it.
Do not need to explicitly stop this sound as the audio system can detect if samples are tied to dead objects.
KJeff01 added 6 commits March 31, 2024 17:00
With this patch `g_bAudioPaused` checks will finally do something if enabled. Fixed any issues that would have come up
from this check working, such as avoiding the pause check in `audio_PlayTrack()` which plays in-game menu sounds for example.
So we don't need to check `g_bAudioPaused` directly in various places.
Renamed `audio_CheckSameQueueTracksPlaying()` as it was not very clear on what it actually does.
`audio_CheckSame3DTracksPlaying()` was not clear on what it actually does.
@KJeff01 KJeff01 added this to the 4.5.0-beta1 milestone Mar 31, 2024
@KJeff01
Copy link
Member Author

KJeff01 commented Mar 31, 2024

Just going to disable the pause stuff for now. I have something huge coming up after this.

@KJeff01 KJeff01 merged commit c3a0c72 into Warzone2100:master Mar 31, 2024
37 checks passed
@KJeff01 KJeff01 deleted the soundFix branch March 31, 2024 23:01
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.

1 participant