Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug FMOD Errors regarding subsounds

Discussion in 'Audio & Video' started by Dominik-Abe, Oct 27, 2023.

  1. Dominik-Abe

    Dominik-Abe

    Joined:
    Nov 15, 2012
    Posts:
    3
    Hi,
    we’re currently working on a content patch for our game and QA reported occasional FMOD errors in the logs.
    We have not seen similar issues during release testing and we have not updated Unity since then (running on Unity 2021.3.25). We’re quite stumped what is happening here.

    We’re using basic Unity Mixer, AudioSource and AudioClip setups with a custom wrapper-layer, but have had next to none interaction or issues with FMOD internals so far.

    The errors in question:

    First QA report with FMOD errors:
    One occurence of
    Code (CSharp):
    1. Audio clip "foo" could not be played. FMOD Error: An invalid seek position was passed to this function.
    (no further callstack)

    Several occurences of
    Code (CSharp):
    1. Audio clip "foo" could not be played. FMOD Error: The error occured because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have.  The operation may also not be able to be performed on a parent sound, or a parent sound was played without setting up a sentence first.
    2. UnityEngine.AudioSource:Play() (at C:\build\output\unity\unity\Modules\Audio\Public\ScriptBindings\Audio.bindings.cs:841)
    (further callstack from our voiceover playback wrapper)
    The same audioclip is the cause of all errors in this report.

    Second QA report
    Code (CSharp):
    1. C:\build\output\unity\unity\Modules\Audio\Public\sound\SoundManager.cpp(228) : Error executing sound->getNumSubSounds(&numSubSounds) (Operation could not be performed because specified sound/DSP connection is not ready. )
    2. Audio clip "bar" could not be played. FMOD Error: The error occured because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have.  The operation may also not be able to be performed on a parent sound, or a parent sound was played without setting up a sentence first.
    (no further callstack)
    This error was caused by a different audioclip in a different session on a different machine.

    Does anyone have a hint at what could be causing this? Or how we could debug this further? These errors do not seem reproduceable, but only happen very rarely in random circumstances.

    Does anyone have a hint at what could be causing this? Or how we could debug this further? These errors do not seem reproduceable, but only happen very rarely in random circumstances.

    Thank you very much!
     
  2. Dominik-Abe

    Dominik-Abe

    Joined:
    Nov 15, 2012
    Posts:
    3
    Code (CSharp):
    1. C:\build\output\unity\unity\Modules\Audio\Public\sound\SoundManager.cpp(228) : Error executing sound->getNumSubSounds(&numSubSounds)
    2.  (Operation could not be performed because specified sound/DSP connection is not ready. ) Audio clip "soundfile" could not be played.
    3.  FMOD Error: The error occured because the sound referenced contains subsounds when it shouldn't have, or it doesn't contain subsounds when it should have. The operation may also not be able to be performed on a parent sound, or a parent sound was played without setting up a sentence first.
    Sadly there are more random errors appearing :(
     
  3. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    430
    Is this happening with short sounds compressed using Vorbis?
    We've been notified of this kind of issue but so far, weren't able to reproduce or identify the cause yet.
     
  4. Dominik-Abe

    Dominik-Abe

    Joined:
    Nov 15, 2012
    Posts:
    3
    Hi, thank you for your answer.
    not sure how you define short, but defiantly the sound were not long :) The sounds from the reports are this long:

    00:05.620
    00:05.779
    00:03.509
    00:01.351

    they are all compressed with vorbis. Those are the settings used for all of them. The are part of assetbundles.
    upload_2023-11-6_12-17-50.png

    We were not able to reproduce the issue. We did stress tests etc...
    We also had no reports this week though the reports from before were from different users with different builds.
    We have no clue what we can do to fix this and right now can only hope it just disappeared again. Which is not very comforting ;)
     
  5. SeventhString

    SeventhString

    Unity Technologies

    Joined:
    Jan 12, 2023
    Posts:
    430
    Hey @Dominik-Abe !

    Over the year, our version of FMOD evolved a lot, and I'm not surprised we could occasionally reach dark places because of race conditions... We've had reports of issues with short Vorbis sounds, but we've never been able to reproduce them sadly...

    That being said, I think the issue you had there is different *sigh...*

    It really seems to be a timing issue, and as it refers to the "readiness" of the sound, I believe you could mitigate or solve that by having a good hard look at your sounds loading. Loading a lot of sounds at the same time to play them immediately MIGHT be where this kind of error occurs.

    Godspeed my friend!
     
  6. liusiyin512

    liusiyin512

    Joined:
    Mar 11, 2022
    Posts:
    1
    Hey @Dominik-Abe !
    I have the same problem. Has the problem been solved?
     
  7. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    185
    Same problem here... still no fix or investigation?