Search Unity

Audio Look for audio silence ahead of time

Discussion in 'Audio & Video' started by gegagome, Feb 6, 2018.

  1. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Hi guys

    I need to detect whether there is silence in my audioclip ahead of time.

    The game I am building is music driven and I want things to happen based on silence of certain tracks.

    Any ideas about how to accomplish this?

    I am playing with Audioclip.GetData but I am struggling skipping ahead 1, or 5 seconds.

    Note that it isn't volume I am looking for, it is the data that makes up the waveform of the track.

    AudioSource.GetSpectrumData only works on the current section of the clip being played.

    If you have any suggestions please chime in.

    Thanks