::v3.4.0::03.2o24::2021.3.0::
To play any Unity AudioSource in scene in full 3D spatialization relative to an audio listener using Resonance:
- attach
AudioStreamListenerAudioSourceto GameObject with source audio - attach
AudioStreamListenerto (any) other GameObject - point/add all required sources to AudioStreamListener's
Audio Stream Listener AudioSourceslist
The source(s) will then play in 3D relative to the listener, which can optionally have Output Driver also set. There can be multiple AudioStreamListeners in scene, and one source can be included as source in multiple listeners
This means that it's possible to play one set of AudioSources on arbitrary system audio output relative to some GameObject/listener and another one similarly relative to some other listener, outputting to different output
See also AudioStreamListenerDemo scene for an example of two listeners outputting AudioSource(s) to user selected output/s
Performance notice:
due to the way Resonance Listener/DSPs are currently used, a separate FMOD system object is created for each AudioStreamListener in the scene
- the overhead should be negligible however and allows for use of multiple Listener GameObjects with the same audio system output.
- there is a limit on the no. of system objects (thus these components) allowed to be created at one time which is capped at 7 (depending on what other AudioStream objects there are in scene - one is for internal usage, the overall FMOD limit is 8 - see also https://fmod.com/docs/2.02/api/core-api-common.html#fmod_max_systems)