javascript - Trying to visualize the time domain of a sound with Web Audio API -


i have problem trying visualize time domain of sound. can play sound - works. when connect analyzer node sound source (which connected because song plays) , context.destination,getbytetimedomaindata returns value 128, means no signal. there additional connection should make? part of code, when connect analyzer looks this:

var analyser = context.createanalyser(); soundsource.connect(analyser); analyser.connect(context.destination); 

more code (from comment below):

source = context.createbuffersource(); source.buffer = audiobuffer; source.loop = false; var analyser = context.createanalyser(); source.connect(analyser); analyser.connect(context.destination); analyser.fftsize = 2048; var timedomain = new uint8array(analyser.frequencybincount); analyser.getbytetimedomaindata(timedomain); 


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -