htmlhtml5-audioconstruct-2

How to play music a little bit delayed with a real-time Advanced audio analyzer


Audio.AnalyserFreqBinCount("audio", 0)

My game is analyzing the audio levels so that music can affect the game behaviour.

How can I play audio a bit delayed, after it has been analyzed, now the analyzing occurs exactly same time when music is played.


Solution

  • Assuming you can access the Web Audio API via the framework, you could use the createDelay() to create a delay node. The delay is given in seconds.

    Then simply:

    Connection diagram