Bug 1116847 - Add support for StereoPannerNodes in web audio editor. r=vp

This commit is contained in:
Jordan Santell 2015-01-06 11:23:00 +01:00
parent 5dd693b89b
commit 1996fd364a
8 changed files with 21 additions and 13 deletions

View File

@ -9,7 +9,7 @@ add_task(function*() {
let { target, front } = yield initBackend(SIMPLE_NODES_URL);
let [_, nodes] = yield Promise.all([
front.setup({ reload: true }),
getN(front, "create-node", 14)
getN(front, "create-node", 15)
]);
let allNodeParams = yield Promise.all(nodes.map(node => node.getParams()));
@ -17,7 +17,8 @@ add_task(function*() {
"AudioDestinationNode",
"AudioBufferSourceNode", "ScriptProcessorNode", "AnalyserNode", "GainNode",
"DelayNode", "BiquadFilterNode", "WaveShaperNode", "PannerNode", "ConvolverNode",
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode"
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode",
"StereoPannerNode"
];
// For some reason nodeTypes.forEach and params.forEach fail here so we use

View File

@ -9,7 +9,7 @@ add_task(function*() {
let { target, front } = yield initBackend(SIMPLE_NODES_URL);
let [_, nodes] = yield Promise.all([
front.setup({ reload: true }),
getN(front, "create-node", 14)
getN(front, "create-node", 15)
]);
let allNodeParams = yield Promise.all(nodes.map(node => node.getParams()));
@ -17,7 +17,8 @@ add_task(function*() {
"AudioDestinationNode",
"AudioBufferSourceNode", "ScriptProcessorNode", "AnalyserNode", "GainNode",
"DelayNode", "BiquadFilterNode", "WaveShaperNode", "PannerNode", "ConvolverNode",
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode"
"ChannelSplitterNode", "ChannelMergerNode", "DynamicsCompressorNode", "OscillatorNode",
"StereoPannerNode"
];
nodeTypes.forEach((type, i) => {

View File

@ -10,7 +10,7 @@ add_task(function*() {
let { target, front } = yield initBackend(SIMPLE_NODES_URL);
let [_, nodes] = yield Promise.all([
front.setup({ reload: true }),
getN(front, "create-node", 14)
getN(front, "create-node", 15)
]);
let allParams = yield Promise.all(nodes.map(node => node.getParams()));
@ -18,7 +18,7 @@ add_task(function*() {
"AudioDestinationNode", "AudioBufferSourceNode", "ScriptProcessorNode",
"AnalyserNode", "GainNode", "DelayNode", "BiquadFilterNode", "WaveShaperNode",
"PannerNode", "ConvolverNode", "ChannelSplitterNode", "ChannelMergerNode",
"DynamicsCompressorNode", "OscillatorNode"
"DynamicsCompressorNode", "OscillatorNode", "StereoPannerNode"
];
allParams.forEach((params, i) => {

View File

@ -25,8 +25,8 @@ add_task(function*() {
navigate(target, SIMPLE_NODES_URL);
var [actors] = yield Promise.all([
getN(gFront, "create-node", 14),
waitForGraphRendered(panelWin, 14, 0)
getN(gFront, "create-node", 15),
waitForGraphRendered(panelWin, 15, 0)
]);
is($("#reload-notice").hidden, true,
@ -37,7 +37,7 @@ add_task(function*() {
"The tool's content should reappear without closing and reopening the toolbox.");
var { nodes, edges } = countGraphObjects(panelWin);
ise(nodes, 14, "after navigation, should have 14 nodes");
ise(nodes, 15, "after navigation, should have 15 nodes");
ise(edges, 0, "after navigation, should have 0 edges.");
yield teardown(target);

View File

@ -17,8 +17,8 @@ add_task(function*() {
reload(target);
let [actors] = yield Promise.all([
getN(gFront, "create-node", 14),
waitForGraphRendered(panelWin, 14, 0)
getN(gFront, "create-node", 15),
waitForGraphRendered(panelWin, 15, 0)
]);
let nodeIds = actors.map(actor => actor.actorID);
let types = [

View File

@ -18,7 +18,7 @@
"createBufferSource", "createScriptProcessor", "createAnalyser",
"createGain", "createDelay", "createBiquadFilter", "createWaveShaper",
"createPanner", "createConvolver", "createChannelSplitter", "createChannelMerger",
"createDynamicsCompressor", "createOscillator"
"createDynamicsCompressor", "createOscillator", "createStereoPanner"
];
let nodes = NODE_CREATION_METHODS.map(method => ctx[method]());

View File

@ -497,5 +497,8 @@ const NODE_DEFAULT_VALUES = {
"type": "sine",
"frequency": 440,
"detune": 0
},
"StereoPannerNode": {
"pan": 0
}
};

View File

@ -30,7 +30,7 @@ const NODE_CREATION_METHODS = [
"createMediaStreamDestination", "createScriptProcessor", "createAnalyser",
"createGain", "createDelay", "createBiquadFilter", "createWaveShaper",
"createPanner", "createConvolver", "createChannelSplitter", "createChannelMerger",
"createDynamicsCompressor", "createOscillator"
"createDynamicsCompressor", "createOscillator", "createStereoPanner"
];
const AUTOMATION_METHODS = [
@ -111,6 +111,9 @@ const NODE_PROPERTIES = {
"MediaStreamAudioSourceNode": {},
"MediaStreamAudioDestinationNode": {
"stream": { "MediaStream": true }
},
"StereoPannerNode": {
"pan": {}
}
};