You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {number} options.numberOfChannels - number of channels.
12
+
*/
8
13
constructor(options){
9
14
if(!options)throwTypeError('options argument is required')
10
15
if(!options.sampleRate)throwTypeError('options.sampleRate is required')
@@ -28,8 +33,8 @@ class AudioBuffer {
28
33
29
34
/**
30
35
* Return data associated with the channel.
31
-
*
32
-
* @return {Array} Array containing the data
36
+
*@param {number} channel - Channel index, starting from 0.
37
+
* @return {Float32Array} Array containing the data.
33
38
*/
34
39
getChannelData(channel){
35
40
if(channel>=this.numberOfChannels||channel<0||channel==null)throwError('Cannot getChannelData: channel number ('+channel+') exceeds number of channels ('+this.numberOfChannels+')');
@@ -39,7 +44,10 @@ class AudioBuffer {
39
44
40
45
41
46
/**
42
-
* Place data to the destination buffer, starting from the position
47
+
* Place data to the destination buffer, starting from the position.
48
+
* @param {Float32Array} destination - Destination array to write data to.
49
+
* @param {number} channelNumber - Channel to take data from.
50
+
* @param {number} startInChannel - Data offset in channel to read from.
0 commit comments