some WebAudio interface missing methods

This commit is contained in:
Gabriel Garcia
2015-07-20 18:52:58 -04:00
parent 6befcf5e84
commit 35e40c5d85

32
webaudioapi/waa.d.ts vendored
View File

@@ -171,3 +171,35 @@ declare enum OscillatorType {
triangle,
custom
}
interface AudioContextConstructor {
new(): AudioContext;
}
interface Window {
AudioContext: AudioContextConstructor;
}
interface AudioContext {
createMediaStreamSource(stream: MediaStream): MediaStreamAudioSourceNode;
}
interface MediaStreamAudioSourceNode extends AudioNode {
}
interface AudioBuffer {
copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
}
interface AudioNode {
disconnect(destination: AudioNode): void;
}
interface AudioContext {
suspend(): Promise<void>;
resume(): Promise<void>;
close(): Promise<void>;
}