scratch-audio/test/__mocks__/AudioContext.js

21 lines
433 B
JavaScript
Raw Normal View History

2018-06-07 22:17:05 -04:00
const AudioNodeMock = require('./AudioNode');
const AudioParamMock = require('./AudioParam');
class AudioContextMock {
createGain () {
return new AudioNodeMock({
gain: new AudioParamMock({
default: 1,
min: -3,
max: 3
})
});
}
createChannelMerger () {
return new AudioNodeMock();
}
}
module.exports = AudioContextMock;