Add webkitOfflineAudioContext definition, and remove invalid constructor.

This commit is contained in:
zaneli
2014-05-13 13:51:00 +09:00
parent 68fd50f64b
commit d5613ac757
2 changed files with 10 additions and 1 deletions
+6
View File
@@ -306,3 +306,9 @@ declare var footstepsBuffer: any;
}
};
()=>{
var context = new webkitOfflineAudioContext(1, 2, 44100.5);
context.startRendering();
context.oncomplete(context.createBufferSource().buffer);
}
+4 -1
View File
@@ -180,11 +180,14 @@ interface OfflineRenderSuccessCallback{
* var offlineContext = new OfflineAudioContext(unsigned long numberOfChannels, unsigned long length, float sampleRate);
*/
interface OfflineAudioContext extends AudioContext{
constructor();
startRendering(): void;
oncomplete: OfflineRenderSuccessCallback;
}
declare var webkitOfflineAudioContext: {
new (numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext;
}
/**
* AudioNodes are the building blocks of an AudioContext. This interface represents audio sources, the audio destination, and intermediate processing modules. These modules can be connected together to form processing graphs for rendering audio to the audio hardware. Each node can have inputs and/or outputs. An AudioSourceNode has no inputs and a single output. An AudioDestinationNode has one input and no outputs and represents the final destination to the audio hardware. Most processing nodes such as filters will have one input and one output. Each type of AudioNode differs in the details of how it processes or synthesizes audio. But, in general, AudioNodes will process its inputs (if it has any), and generate audio for its outputs (if it has any).
*