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

Custom audios not playing: CustomSoundHandler, CustomSoundPatcher and AudioUtils fix. #432

Merged
merged 8 commits into from
Jul 4, 2023

Conversation

VELD-Dev
Copy link
Contributor

@VELD-Dev VELD-Dev commented Jul 4, 2023

Made with Metious ! Gigantic thanks to them for taking time to inspect FMOD bugs and find solutions because I was not smart enough to find it myself because of my unexperience with FMOD system :)

Changes made in this pull request

  • CustomSoundHandler now checks the bus channels when a modder adds a new sound.
  • AudioUtils.TryPlaySound now also do a check for the buses. If the bus is, somehow, not locked, then the function will do it, however the sound will have to be replayed to work.
  • CustomSoundPatcher have been a little modified to fix the PlayBackState() check

Breaking changes

  • CustomSoundHandler.RegisterCustomSound methods now have a mode parameter.

VELD-Dev and others added 5 commits July 4, 2023 12:53
A gigantic thanks to @Metious for researching the issues and the errors because I was too dumb and unexperienced with FMOD to do that, really !

Co-Authored-By: Metious <[email protected]>
…ut in case you don't want to deal with AudioUtils.CreateSound(sound, MODE).

Added constant optimal Sound Modes to AudioUtils.
Based on what ROTA researches gave.
Nautilus/Utility/AudioUtils.cs Outdated Show resolved Hide resolved
Nautilus/Utility/AudioUtils.cs Outdated Show resolved Hide resolved
@LeeTwentyThree
Copy link
Member

LeeTwentyThree commented Jul 4, 2023

This seems to fix any known issues we were having with custom sounds, great work everyone!

@LeeTwentyThree LeeTwentyThree merged commit 356b4d7 into SubnauticaModding:master Jul 4, 2023
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants