Forum rules - please read before posting.

[Bug] Audio Glitch

When you pause the game and use actionLists (for menu interactions for example) if you had some audio playing, you can hear a small bits of the audio when you execute an actionList. I did some troubleshooting and it seems than AC GameState switches to cutscene for a short moment when activating an actionList. And since AC GameState is not Paused anymore, the AudioSource.pause = false gets called and you can hear a short moment of the audio. During this entire procedure Time.timeScale seems to stay at 0, so checking against timescale instead of GameState might be a possible solution.  Should be around the StateHandler.cs 363 line.

Comments

  • Thanks for the report.  That's not a bad suggestion, but I'll have to examine it more closely.
  • Not so sure that this would be a safe change to make, actually.  Can you provide steps to reproduce this, for example the ActionList that causes this?
  • A simple change between menus causes the audio to run. For example:

    image

    Similar switches are executed between multiple menus, some of the switches are more complex, but this one causes the sound to be heard too, so do the others.

    Another aspect that may influence this is that I have a separate menu that has "Pause gameplay when enabled?" checked. It is empty and has no elements. While all of the actual menus have this property unchecked.

    The sfx that is playing has a special blend of 0 (2D), it loops and starts playing on awake (ambient sfx in essence).
  • Thank you - using a separate Menu to pause the game is indeed the cause of it, as I can't recreate it without that.  I shall look into it.
  • Update: Seems this actually isn't so reliable to reproduce - likely because the 1-frame for which the ActionList is running will have different effects on different machines.

    Be sure to check that Unfreeze pause menus? is set to Off in the ActionLists's properties.  That should ensure the game never reverts the timescale.
  • Thanks for the tip, this combined with Time.timeScale check for resuming audio should keep it pretty stable and even if it happens very rarely it's not that big of a deal.
  • OK.  Again, I'm reluctant to make the timeScale check official as I think it could have knock-on effects.  Not unfreezing pause menus should be enough, but it's a simple manual edit if not.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.