Forum rules - please read before posting.

Sound volume on scene start

I'm working on the sound for my game and things are going well, the music and sound implementations in AC are great. However, I've noticed that when a scene with a background sound loads, the sound starts off at max volume a few milliseconds before adjusting to the volume of the settings. Has anyone else experienced this and know a workaround? It's most noticeable with looping background atmosphere sounds.

Comments

  • Does this background sound play due to the AudioSource's Play on awake checkbox, or a Sound: Play Action in the OnStart Cutscene?  Does the blip occur if you start the game from this scene, or only when transitioning to it from another?
  • I've done some more testing, it seems that Play on awake makes it more prominent, but it still happens irregularly when played with a Sound: Play action on OnStart. It's also more noticeable when you start from the scene rather than transition from another.

    I have some scenes with wind noise, so it's probably more noticeable when there's a constant, white noise-ish sound in the background. When I turn down Sound effect volume in settings it still has a few milliseconds of background sound when entering the scene.
  • Could also be related to the "intensity" of the scene, i.e. number of tris that slow down the initialisation.

    I'll look into it and will ask for more info if needed.
  • Cool. I haven't tried building for iOS after I started sound design, I'll try and see how it behaves on hardware.
  • I've found the cause, but would appreciate some testing with the fix.  In Options.cs' Start function, there's a call to run the OnStartCoroutine:

    StartCoroutine (OnStartCoroutine ());

    Remove it and replace it with:

    AfterLoad ();

    IIRC, the coroutine was placed there to ensure AC had fully loaded before being called, but as the StateHandler now initialises the component it should't be necessary.  I would still appreciate the testing, though.
  • Did a quick test, seems to be working great! Thanks Chris!
  • Hi Chris, I've ran into the same problem. In newer AC version it seems like AfterLoad(); is called instead of StartCoroutine (OnStartCoroutine ()); so I can skip that step, but I'm not sure what you meant by "Sound: Play Action in the OnStart Cutscene". All my sounds play due to the AudioSource's Play on awake checkbox.
  • Don't use "Play On Awake" - it'll cause playback before AC has a chance to initialise.
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.