Delay the moment i hear the sound (not play) - is it possible ?

Hello everyone.

For specific reasons i need to play the same music twice in my scene. one that starts very early so i can make some analyse about the sound, the other starts 3 seconds later and show effects according to what the analyse came up with. Now i could do that either by having 2 sources with an offset of 3 seconds or just make sure I hear the music with a 3 sec delay compared to the moment it’s read and spectrum analysed.
Is it possible to have a sound playing, that gives spectrum data but NOT HEARING it. it seems to me everything I try (lowering volume, making it far away, etc) also stops spectrum data from being generated.

Any help is welcome :slight_smile:


This is one of the cases where one look into the Scripting Reference gives you the answer :slight_smile:
AudioSource.PlayDelayed and AudioSource.PlayScheduled look like they are what you want.

I guess you get the spectrum data from your AudioListener? Try getting it from your AudioSource directly instead. Muting the source then should still give you spectrum data.

well actually I did read trough it and my spectrum was on the source and not the listener and yet I still had the issue. .
I however managed to achieve the desired goal by playing around with the mixer.