i have toggleliveinput() function, , here's problem:
i run code, , works fine on desktop. when build app (with intel xdk in case wondering), works long you've launched app once. first time, ignore function. won't it. see why? thanks!
function toggleliveinput() { getusermedia( { "audio": { "mandatory": { "googechocancellation": "false", "googautogaincontrol": "false", "goognoisesuppression": "false", "googhighpassfilter": "false" }, "optional": [] }, }, gotstream); } function gotstream(stream) { // create audionode stream. mediastreamsource = audiocontext.createmediastreamsource(stream); // connect destination. analyser = audiocontext.createanalyser(); analyser.fftsize = 2048; mediastreamsource.connect( analyser ); updatepitch(); meter = createaudiometer(audiocontext); mediastreamsource.connect(meter); drawloop(); } function drawloop( time ) { rafid = window.requestanimationframe( drawloop ); volumeofnote = meter.volume; } toggleliveinput();
edit: figured out strange. used try() catch(e)
, no error found. means function being igonred. 1 time? strange...
Comments
Post a Comment