goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.94k stars 2.23k forks source link

Audio Visualization #1212

Open ZARk-be opened 5 years ago

ZARk-be commented 5 years ago

Hello, This seem to be a recurring issue about the webaudio analyser.

Right now, i'm able to get data out of the analyser with the following code :

let context = sound._sounds[0]._node.context; let src = sound._sounds[0]._node.bufferSource; analyser = context.createAnalyser(); src.connect(analyser); analyser.fftSize = 512; let bufferLength = analyser.frequencyBinCount; dataArray = new Uint8Array(bufferLength);

Right now, the "strange" issue i'm having .. if i PAUSE the playing sound, i'm getting all zeroes in the analyser (so far so good). if i now UNPAUSE, the sound resumes, but i keep getting zeroes. As if something changed and the bufferSource isn't connected to my analyser anymore ? Did i connect the analyser all wrong ?

SalahAdDin commented 8 months ago

@ZARk-be How did you fix it?

Right now it is not possible to get access to the Howler internal properties.