Sound is not real? What does it mean?

Here a sound is supposed to play near the ball, it sometimes pops up and disappears. The amount of channels goes from 2 to 23? Min 44 maximum 88.

Hi,

A sound not being “real” means that it has been virtualized i.e. it is still being played back and kept track of, but isn’t outputting audio. This can happen for a number of reasons, such as exceeding the “Real Channel Count” limit set in FMOD Settings in Unity - I’d recommend taking a read of the FMOD Studio docs on Virtualization and the Core API white paper on virtual voices.

To help diagnose your issue, can I get you to provide a few pieces of information? Specifically:

  • Your Unity, FMOD Studio, and FMOD Unity Integration version numbers
  • How you’re playing your event - StudioEventEmitter, or your own script? If possible can you provide a code snippet of anything relevant you’re doing to with the event?
  • Some more info on what exactly the event is, whether it contains any specific or complex behavior, etc.

Sorry for the late reply!!

  • FMOD 2.02.11, Unity 2019.4.40.f1, FMOD Unity Integration 2.2.11

  • Script (attached to other object):

> using System.Collections;
> using System.Collections.Generic;
> using UnityEngine;
> 
> public class AudioColliderA : MonoBehaviour
> {
>     public GameObject audioObject;
>     public FMODUnity.StudioEventEmitter playingfmodaudio;
> 
>     // Start is called before the first frame update
>     void Start()
>     {
>         audioObject = GameObject.FindGameObjectWithTag("Audio");
>     }
> 
>     void OnTriggerEnter(Collider other)
>     {
>         if (other.CompareTag("Player"))
>         {
>             playingfmodaudio.Play();
>         }
>     }
> 
>     void OnTriggerExit(Collider other)
>     {
>         if (other.CompareTag("Player"))
>         {
>             playingfmodaudio.Stop();
>         }
>     }
> }

Other complex behavior would be that the object is moving.
I did find the problem I believe… The collider I can make is limited because I require a trigger on it to make it work, according to the script. If I make it bigger, it causes the whole level to break apart. So if I knew a C# line that’d say “collider exists on object” instead of requiring trigger, it might work. But I do not know how to write that xd

In the meantime I’ll try some things of course.


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AudioColliderC : MonoBehaviour

> {
>     public GameObject audioObject;
>     public FMODUnity.StudioEventEmitter playingfmodaudio;
> 
>     // Start is called before the first frame update
>     void Start()
>     {
>         audioObject = GameObject.FindGameObjectWithTag("Audio");
>     }
> 
>     void OnObjectEnter(Collider other)
>     {
>         if (other.CompareTag("Player"))
>         {
>             playingfmodaudio.Play();
>         }
>     }
> 
>     void OnObjectExit(Collider other)
>     {
>         if (other.CompareTag("Player"))
>         {
>             playingfmodaudio.Stop();
>         }
>     }
> }

Apparently something as easy as this seems to work, however the audio is very soft and barely hearable despite adding multiple gains on it. I’ll show how it set up in FMOD. Also the character seems to be dragged upwards sometimes due to this?


Unfortunately, I haven’t been able to replicate your volume issue, but I suspect it is due to your use of the Object Spatializer effect, as well as your envelopment, sound size, minimum extent, and distance override settings on your Spatialization effects.

I would try resetting those settings back to default, removing the Object Spatializer, setting Envelopment to “Auto”, and seeing whether that resolves your problem. If you do require specific a specific distance attenuation envelope or spatialization settings, I would recommend reading over our documentation on the Spatializer effect, as well as the documentation on Spatialization Options, to better understand how to do what you want to do.

Regarding the spatialization effects - using a Spatializer effect causes FMOD to spatialize your audio signal based on the 3D attributes of the event instance and listener(s). Using an Object Spatializer effect, on the other hand, bypasses FMOD and allows platform-specific spatialization options (Dolby Atmos, DTS:X, etc.) to be used instead, and as such is only relevant if you’re intending to make use of those options. Typically you will not need to use both Spatializer effects. Additionally, an Object Spatializer will output directly to the master bus, bypassing any subsequent effects up to that point, which is likely why your Gains seemed to have no effect.

I’m not sure if it’s what you’re looking for or whether you’re aware of it, but you should be able to check whether a Collider exists on a GameObject using one of the following:

// method 1: GetComponent and check null
Collider collider1 = gameObject.GetComponent<Collider>();
if (collider1 != null)
{
    // ...
}

// method 2: use TryGetComponent and check returned bool
bool result = gameObject.TryGetComponent<Collider>(out Collider collider2);
if (result)
{
    // ...
}

You can also use the Collider method OnCollisionEnter() and OnCollisionExit() for GameObjects with non-trigger Collider components, in exactly the same way that you’re already using OnTriggerEnter() and OnTriggerExit() for your GameObjects that are using triggers.

This is a bit of an info dump, but I hope it helps. If you still find that you’re having issues after removing the Object Spatializer and/or resetting the spatialization settings, feel free to let me know.