Tom
Tom

Reputation: 6707

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.

Upvotes: 0

Views: 87

Answers (1)

user1693593
user1693593

Reputation:

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:

  • Plug source into analyzer node as well as delay node.
  • Then connect delay node to destination
  • Process the data from analyzer node as usual.

Connection diagram

Upvotes: 1

Related Questions