Created
December 13, 2015 22:31
-
-
Save mohayonao/f675267a8dd7c0a30116 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AudioBuffer { | |
| @TestAPI.props.readonly() | |
| duration() { | |
| return this.length / this.sampleRate; | |
| } | |
| @TestAPI.methods.param("destination", Float32Array) | |
| @TestAPI.methods.param("channelNumber", "positive number") | |
| @TestAPI.methods.param("[ startInChannel ]", "positive number") | |
| @TestAPI.methods.contract({ | |
| precondition(destination, channelNumber, startInChannel = 0) { | |
| if (this._.length <= startInChannel) { | |
| throw new TypeError(``); | |
| } | |
| } | |
| }) | |
| @TestAPI.versions({ chrome: "43-", firefox: "27-", safari: "none" }) | |
| copyFromChannel(destination, channelNumber, startInChannel = 0) { | |
| /* ... */ | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment