- From: Corban Brook <corbanbrook@gmail.com>
- Date: Tue, 13 Jul 2010 12:38:35 -0400
- To: Chris Rogers <crogers@google.com>
- Cc: Ricard Marxer Piñón <ricardmp@gmail.com>, public-xg-audio@w3.org
Received on Tuesday, 13 July 2010 16:39:14 UTC
Hello Chris, Had another chance to go over your api today. I am going to be making a javascript layer implementation of your spec which will work on top of the mozilla audio data api. This should allow us to review and quickly prototype new features or changes on our working firefox implementation. One question Richard brought up on IRC which I could not find an answer for in your API is how do we add existing DOM audio elements to the graph? An audio element is in essence a Source and Destination node, How would I inject a lowpass filter into the pipeline? In the mozilla API we do this by muting the audio element and then reading out frames, filtering and then piping to a second non-DOM Audio element (Hacky, I know). Here is a rough setup of how this might work, could you fill in the gaps for me? var context = new AudioContext(); var lowpass = context.createLowPass2Filter(); var audio = document.getElementById('audioEle'); function filterSound() { var source = context.createAudioBuffer(audio); // perhaps passing in the audio element here generates 1 frame worth of buffer as it plays ? source.connect(lowpass); lowpass.connect(context.destination); } Re, Corban
Received on Tuesday, 13 July 2010 16:39:14 UTC