Forum rules - please read before posting.

Sound starts at volume 1

When playing sounds with Play: Sound on a sound object, despite of the set relative volume, the sound script (Sounds.cs) seems to bump the associated Sound Source volume to 1 briefly (for less than a second) before it settles down to the relative volume, which causes a suddenly louder very brief volume on startup. Can this be fixed so that there is no such delay and rather properly starting out at the intended relative volume from the outset?

Selene

Comments

  • What are your AC/Unity versions, and by "startup", are you referring to an OnStart Cutscene, or simply the scene starting?

    A Sound object should be played via the Sound: Play Action, rather than it's AudioSource component's Play On Awake Inspector field - is this the case?

  • Unity is 2021.1.15f1. AC is 1.73.7.

    By startup, I mean starting play mode, which in my code automatically triggers an action list.

    The action list does Sound:Play, and is linked to an object in the scene which is an AC sound, and has a sound script, along with an audio source (the one that comes in automatically when you create an AC "sound object").

    I have dragged the clip to the audio source component on this object. Play on awake is off.

  • If you're relying on custom code, please share so that I can see exactly when it is being run.

    Does the issue occur if you disable this call, and assign the ActionList via the OnStart Cutscene?

  • I tried omitting the custom code altogether and putting the action list in On start in the AC scene tag. Same thing happens. The action list has only one node.

    Sound :Play

    Sound object set to one in the scene

    Sound action Play

    Loop off

    Ignore if already playing off

    new clip, unassigned

    Wait until finished unchecked.

    After running, stop

    We are talking literally a fraction of a second. Even if the associated sound source is set to 0 at start, it goes straight 1, and then done to a relative volume within the span of probably 1/4 of a second, but enough to be audible at the very start.

    Selene

  • Thanks for the details - I've recreated the issue, and will look into a fix.

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.