howler.js

Connect analyzer to Howler sound

做~自己de王妃 提交于 2019-12-03 16:07:30
I have been trying for a while to connect an analyser to a Howler sound without any success. I create my Howler sound like this: var sound = new Howl({ urls: [ '/media/sounds/genesis.mp3', ] }); And then I create my analyser using Howler global context like this: var ctx = Howler.ctx; var analyser = ctx.createAnalyser(); var dataArray = new Uint8Array(analyser.frequencyBinCount); analyser.getByteTimeDomainData(dataArray); I am quite new to the web audio API. I think I am missing a connection somewhere but I don't know to what I have to connect it in Howler. avanwink Web Audio uses a sequence

How to chain sounds on howler.js

故事扮演 提交于 2019-12-01 09:38:52
问题 I need to play some sounds in howler.js the thing is that I don't know how to chain it. For example, at string BCG would need to play b.ogg then c.ogg and finally g.ogg If I just use (after loading): sound.play('b'); sound.play('c'); sound.play('g'); All of them start and overlap which isn't what I need. I see there's a onend property, however can't figure out how to use it properly. Regards. 回答1: You could create a function playString(yourString) that will read each character and dynamically