Merge pull request #3301 from kubosho/fix-parameter-type-to-waa

waa.d.ts: Fix parameter type (when -> when?)
This commit is contained in:
Masahiro Wakame
2014-12-11 23:15:20 +09:00
3 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -656,7 +656,7 @@ This document generated by [dt-contributors-generator](https://github.com/vvakam
* [:link:](vinyl-fs/vinyl-fs.d.ts) [vinyl-fs](https://github.com/wearefractal/vinyl-fs) by [vvakame](https://github.com/vvakame)
* [:link:](watch/watch.d.ts) [watch](https://github.com/mikeal/watch) by [Carlos Ballesteros Velasco](https://github.com/soywiz)
* [:link:](jquery.watermark/jquery.watermark.d.ts) [Watermark plugin for jQuery](http://jquery-watermark.googlecode.com) by [Anwar Javed](https://github.com/anwarjaved)
* [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net)
* [:link:](webaudioapi/waa.d.ts) [Web Audio API](http://www.w3.org/TR/webaudio) by [Baruch Berger](https://github.com/bbss), [Kon](http://phyzkit.net), [kubosho](https://github.com/kubosho)
* [:link:](webaudioapi/waa-nightly.d.ts) [Web Audio API (nightly)](http://www.w3.org/TR/2012/WD-webaudio-20120802) by [Baruch Berger](https://github.com/bbss)
* [:link:](webmidi/webmidi.d.ts) [Web MIDI API](http://www.w3.org/TR/webmidi) by [Toshiya Nakakura](https://github.com/nakakura)
* [:link:](devextreme/dx.webappjs.d.ts) [WebAppJS](http://js.devexpress.com/WebDevelopment) by [DevExpress Inc.](http://devexpress.com)
+11 -2
View File
@@ -81,11 +81,20 @@ declare var footstepsBuffer: any;
panner.connect(wet3);
dry3.connect(masterDry);
wet3.connect(reverb);
// Start the sources now.
source1.start(0);
source2.start(0);
// MEMO: should be when parameter is 0
// http://www.w3.org/TR/webaudio/#AudioBufferSourceNode
source2.start();
source3.start(0);
// Stop the sources are 2 seconds later.
source1.stop(2);
// MEMO: should be when parameter is 0
// http://www.w3.org/TR/webaudio/#AudioBufferSourceNode
source2.stop();
source3.stop(2);
};
()=>{
+3 -3
View File
@@ -1,6 +1,6 @@
// Type definitions for Web Audio API
// Project: http://www.w3.org/TR/webaudio/
// Definitions by: Baruch Berger <https://github.com/bbss>, Kon <http://phyzkit.net/>
// Definitions by: Baruch Berger <https://github.com/bbss>, Kon <http://phyzkit.net/>, kubosho <https://github.com/kubosho>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/**
@@ -545,14 +545,14 @@ interface AudioBufferSourceNode extends AudioSourceNode {
* @param offset the offset time in the buffer (in seconds) where playback will begin. This parameter is optional with a default value of 0 (playing back from the beginning of the buffer).
* @param duration the duration of the portion (in seconds) to be played. This parameter is optional, with the default value equal to the total duration of the AudioBuffer minus the offset parameter. Thus if neither offset nor duration are specified then the implied duration is the total duration of the AudioBuffer.
*/
start(when: number, offset?: number, duration?: number): void;
start(when?: number, offset?: number, duration?: number): void;
/**
* Schedules a sound to stop playback at an exact time. Please see deprecation section for the old method name.
*
* The when parameter describes at what time (in seconds) the sound should stop playing. It is in the same time coordinate system as AudioContext.currentTime. If 0 is passed in for this value or if the value is less than currentTime, then the sound will stop playing immediately. stop must only be called one time and only after a call to start or stop, or an exception will be thrown.
*/
stop(when: number): void;
stop(when?: number): void;
}
/*