Search Unity

Bug Volumes of snapshots work in-engine but not in build

Discussion in 'Audio & Video' started by mfleischmann, Mar 7, 2023.

  1. mfleischmann

    mfleischmann

    Joined:
    Nov 14, 2022
    Posts:
    1
    Hey all! We are having trouble with audio integration and couldn't find a similar problem/solution within the unity forums.
    • The volume of our audio sounds different in-engine vs. our build
    • It seems that the volumes we defined within mixing snapshots are not applied correctly within the build. Mixing snapshots seem to be somehow active, however, as there is a relative volume difference over the course of the game. Just not the right one.
    Our platform is PC (windows only), we're not using any middleware. Our unity version is 2021.3.6f1. We verified this issue across multiple PCs (building on multiple PCs & testing our builds on multiple PCs).

    We managed to verify that this issue is likely due to snapshots changing/being set in runtime: When disabling all mixing snapshots except for the default one, its settings are applied correctly in-engine and in the build.

    Thanks for your support, we would appreciate an urgent answer.
     
  2. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    416
    Hi @mfleischmann ,

    Could you please produce a minimal project reproducing the issue and submit a bug report?

    What was your methodology to assert the volume difference?
     
  3. dgeiger

    dgeiger

    Joined:
    Jun 17, 2019
    Posts:
    1
    Hi @SeventhString thank you for the response.

    I'm in the same team as mfleischmann.

    How we analyzed the issue:
    • We first determined on whether the issue is related to the audio sources by logging their volume and position (same for the audio listener). We did this to make sure that these values are identically between editor and build (which they were)
    • We checked whether the correct snapshots were used in our build (once again via logging the currently applied snapshot) => the same snapshots were used in build and editor.
    • We checked if disabling the use of snapshot generally helps (we did a simple listening test for this) and came to the conclusion that build and editor without the use of snapshots sound very close to each other (can't say for sure if identically)
    • We than noticed that in our version, if a snapshot was applied, some audio Mixer are still playing audible sound in the build even though those mixer have their volume turned to their min-value (once again, this worked as intended in the editor).
    • We than did another test where we disabled the snapshots once more and turned the same mixer manually down. This time editor and build sounded the same (both times no audible sound).
    Due to those tests we came to the conclusion that the issue has to do with snapshots, the fact that they behave differently from editor and build leads us to assume this is a bug.
    furthermore because of the test with the mixer volume we think the it is the build that has the "wrong" values applied.

    a question from my side:
    Is there a way to debug the values of a AudioGroup/Mixer and/or Snapshot values.
    (mostly volume, but other parameters may also be interesting).

    We will look into re-creating this issue in a minimal project once we have time to do so (this may take some time though).
     
  4. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    416
    Hi @dgeiger ,
    Is there a way to debug the values of a AudioGroup/Mixer and/or Snapshot values.
    (mostly volume, but other parameters may also be interesting).

    The snapshot themselves don't expose a lot of information. You can always use the mixers exposed parameters to read the value, it sounds like monitoring the target attenuation values is what you'd need.