- From: Chris Rogers <crogers@google.com>
- Date: Tue, 13 Nov 2012 12:08:06 -0800
- To: Ray Bellis <ray@bellis.me.uk>
- Cc: public-audio@w3.org
- Message-ID: <CA+EzO0mMQzURPh59KwCUhT4fk-PHyKL7bdDC=0rhV2Ax1hBAHw@mail.gmail.com>
On Tue, Nov 13, 2012 at 11:43 AM, Ray Bellis <ray@bellis.me.uk> wrote: > On 06/11/2012 16:42, Ray Bellis wrote: > >> This works on Chrome 25.0.1317.0 canary but doesn't work on Chrome 22 - >> the node's "playBackState" appears stuck in "scheduled" even though I >> called "node.noteOn(0)". >> > The problem I reported last week persists in Chrome 23, but I've found > that it's not related directly to my "Unity Source Node". It's also present > in Safari 6.0.x > > My set up code is below: > > // WebAudio set up > var ctx = this.ctx = new webkitAudioContext(); > > // Main Audio chain > // NB: filters doubled to provide original 24dB/octave cutoff > var osc = this.osc = ctx.createOscillator(); > var vcaenv = this.vcaenv = ctx.createGainNode(); > var filter1 = this.filter1 = ctx.createBiquadFilter(); > var filter2 = this.filter2 = ctx.createBiquadFilter(); > var master = this.master = ctx.createGainNode(); > var mute = this.mute = ctx.createGainNode(); > > osc.connect(filter1); > filter1.connect(filter2); > filter2.connect(vcaenv); > vcaenv.connect(master); > master.connect(mute); > mute.connect(ctx.destination); > > // VCF chain > var unity = this.unity = ctx.createUnitySource(); > var vcfenv = this.vcfenv = ctx.createGainNode(); > var vcfgain = this.vcfgain = ctx.createGainNode(); > > unity.connect(vcfenv); > vcfenv.connect(vcfgain); > vcfgain.connect(filter1.**frequency); > vcfgain.connect(filter2.**frequency); > > The primary chain is all audio: oscillator -> VCA EG -> Filters * 2 -> > Master Volume -> Audio On/Off > > The secondary chain is there to allow an envelope to be applied to the two > filters. The filters have a base frequency, and then the VCF EG is > multiplied by a gain node set to the same frequency as the filters and then > also connected to the filters. The effect _should_ be that when the VCF EG > is at "1" the filter cutoff goes up by one octave. > > But - the unity node _never_ leaves "scheduled" state. I tried replacing > the AudioBufferNode it's built from with a standard oscillator and I get > the same behaviour. > > *However* - if I add: > > vcfgain.connect(osc.frequency)**; > > at the end, it all starts (but of course doesn't sound right). > > It looks like something is confusing the node graph, but I can't tell > what. I've looked on the WebKit bugzilla and can't find any fixes that > look related, although it does appear fine in Chrome 25. I'd really like > to get this up and working on standard releases of Chrome and Safari so I > can finish the project and release it. > > Any ideas? > > thanks, > > Ray > Ray, could you please create a reduced/simplified test case with the exact code you're working with, then write up a WebKit bug. I can have a look if I have a working/semi-working test page to start with... Chris
Received on Tuesday, 13 November 2012 20:08:34 UTC