I’ve set up some MetaSounds sources which all play .wav files. All of these wave sounds are set to Prime on Load and I’m playing the MetaSounds at run-time using Spawn Sound 2D.
However, every sound I play has about a quarter second delay before it actually plays.
Does anyone know what could cause this?
a consistent quarter second on every spawn is rarely loading latency; it is one of three specific mechanisms:
- onset inside the metasound: if the wave player node starts with a fade in, or an envelope/attack stage precedes the output, the sound begins with silence by construction. open the metasound and check the path from wave player to output: any fade in on the wave player, any attack on an envelope, any delay node. a 0.25s attack on an ADSR is the classic culprit and reads exactly like playback delay.
- wave priming vs streaming: prime on load helps but the wave player still opens the stream on first play unless the metasound’s wave player is set to block on load. in a metasound played through spawn sound 2d, check the wave player’s advanced settings: enable blocking on load so the first block is memory resident before play returns.
- the audio mixer voice pool: spawn sound 2d goes through the mixer; if the sound class or the global settings force a small pool with virtualization, a voice can start virtualized. less likely at a fixed quarter second, but check concurrency settings on the sound class for a silence-induced ramp.
diagnostic that isolates it in a minute: play the same wav via a plain sound wave (spawn sound 2d). if the plain wave starts instantly, the metasound graph itself contains the delay (case 1). if both are delayed, it is priming/streaming (case 2).
the robust shipping config for metasound one-shots: prime on load on the source, blocking on load on the wave player node, no fades inside the graph (handle fades with the component or volume class), and if spawn burst is possible (hundreds of spawns in one frame), pre-warm by triggering a silent zero-volume play once at load.