@@ -41,8 +41,7 @@ class AudioContext extends EventTarget {
41
41
/** Returns the current state of the AudioContext. */
42
42
def state : String = js.native
43
43
44
- /** Closes the audio context, releasing any system audio resources that it uses.
45
- */
44
+ /** Closes the audio context, releasing any system audio resources that it uses. */
46
45
def close (): js.Promise [Unit ] = js.native
47
46
48
47
/** Creates an AnalyserNode, which can be used to expose audio time and frequency data and for example to create data
@@ -106,12 +105,10 @@ class AudioContext extends EventTarget {
106
105
*/
107
106
def createDelay (maxDelayTime : Int ): DelayNode = js.native
108
107
109
- /** Creates a DynamicsCompressorNode, which can be used to apply acoustic compression to an audio signal.
110
- */
108
+ /** Creates a DynamicsCompressorNode, which can be used to apply acoustic compression to an audio signal. */
111
109
def createDynamicsCompressor (): DynamicsCompressorNode = js.native
112
110
113
- /** Creates a GainNode, which can be used to control the overall volume of the audio graph.
114
- */
111
+ /** Creates a GainNode, which can be used to control the overall volume of the audio graph. */
115
112
def createGain (): GainNode = js.native
116
113
117
114
/** Creates a MediaElementAudioSourceNode associated with an HTMLMediaElement. This can be used to play and manipulate
@@ -135,25 +132,21 @@ class AudioContext extends EventTarget {
135
132
*/
136
133
def createMediaStreamDestination (): MediaStreamAudioDestinationNode = js.native
137
134
138
- /** Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone.
139
- */
135
+ /** Creates an OscillatorNode, a source representing a periodic waveform. It basically generates a tone. */
140
136
def createOscillator (): OscillatorNode = js.native
141
137
142
- /** Creates a PannerNode, which is used to spatialise an incoming audio stream in 3D space.
143
- */
138
+ /** Creates a PannerNode, which is used to spatialise an incoming audio stream in 3D space. */
144
139
def createPanner (): PannerNode = js.native
145
140
146
141
/** Creates a PeriodicWave, used to define a periodic waveform that can be used to determine the output of an
147
142
* OscillatorNode.
148
143
*/
149
144
def createPeriodicWave (real : js.typedarray.Float32Array , imag : js.typedarray.Float32Array ): PeriodicWave = js.native
150
145
151
- /** Creates a StereoPannerNode, which can be used to apply stereo panning to an audio source.
152
- */
146
+ /** Creates a StereoPannerNode, which can be used to apply stereo panning to an audio source. */
153
147
def createStereoPanner (): StereoPannerNode = js.native
154
148
155
- /** Creates a WaveShaperNode, which is used to implement non-linear distortion effects.
156
- */
149
+ /** Creates a WaveShaperNode, which is used to implement non-linear distortion effects. */
157
150
def createWaveShaper (): WaveShaperNode = js.native
158
151
159
152
/** Asynchronously decodes audio file data contained in an ArrayBuffer. In this case, the ArrayBuffer is usually
@@ -175,8 +168,7 @@ class AudioContext extends EventTarget {
175
168
errorCallback : js.Function0 [_] = js.native
176
169
): js.Promise [AudioBuffer ] = js.native
177
170
178
- /** Resumes the progression of time in an audio context that has previously been suspended.
179
- */
171
+ /** Resumes the progression of time in an audio context that has previously been suspended. */
180
172
def resume (): js.Promise [Unit ] = js.native
181
173
182
174
/** Suspends the progression of time in the audio context, temporarily halting audio hardware access and reducing
@@ -269,12 +261,10 @@ trait AudioNode extends EventTarget {
269
261
*/
270
262
var channelInterpretation : String = js.native
271
263
272
- /** Allows us to connect one output of this node to one input of another node.
273
- */
264
+ /** Allows us to connect one output of this node to one input of another node. */
274
265
def connect (audioNode : AudioNode ): Unit = js.native
275
266
276
- /** Allows us to connect one output of this node to one input of an audio parameter.
277
- */
267
+ /** Allows us to connect one output of this node to one input of an audio parameter. */
278
268
def connect (audioParam : AudioParam ): Unit = js.native
279
269
280
270
/** Allows us to disconnect the current node from another one it is already connected to.
@@ -434,8 +424,7 @@ trait AudioBufferSourceNode extends AudioNode {
434
424
*/
435
425
def stop (when : Double = 0.0 ): Unit = js.native
436
426
437
- /** Is an EventHandler containing the callback associated with the ended event.
438
- */
427
+ /** Is an EventHandler containing the callback associated with the ended event. */
439
428
var onended : js.Function1 [Event , _] = js.native
440
429
}
441
430
@@ -458,8 +447,7 @@ trait AudioBufferSourceNode extends AudioNode {
458
447
@ js.native
459
448
trait AudioDestinationNode extends AudioNode {
460
449
461
- /** Is an unsigned long defining the maximum amount of channels that the physical device can handle.
462
- */
450
+ /** Is an unsigned long defining the maximum amount of channels that the physical device can handle. */
463
451
var maxChannelCount : Int = js.native
464
452
}
465
453
@@ -472,12 +460,10 @@ trait AudioDestinationNode extends AudioNode {
472
460
@ js.native
473
461
trait AudioListener extends AudioNode {
474
462
475
- /** Is a double value representing the amount of pitch shift to use when rendering a doppler effect.
476
- */
463
+ /** Is a double value representing the amount of pitch shift to use when rendering a doppler effect. */
477
464
var dopplerFactor : Double = js.native
478
465
479
- /** Is a double value representing the speed of sound, in meters per second.
480
- */
466
+ /** Is a double value representing the speed of sound, in meters per second. */
481
467
var speedOfSound : Double = js.native
482
468
483
469
/** Defines the position of the listener.
@@ -552,8 +538,7 @@ trait AudioParam extends AudioNode {
552
538
*/
553
539
var value : Double = js.native
554
540
555
- /** Represents the initial value of the attributes as defined by the specific AudioNode creating the AudioParam.
556
- */
541
+ /** Represents the initial value of the attributes as defined by the specific AudioNode creating the AudioParam. */
557
542
val defaultValue : Double = js.native
558
543
559
544
/** Schedules an instant change to the value of the AudioParam at a precise time, as measured against
@@ -646,20 +631,16 @@ trait BiquadFilterNode extends AudioNode {
646
631
*/
647
632
val frequency : AudioParam = js.native
648
633
649
- /** Is an a-rate AudioParam representing detuning of the frequency in cents.
650
- */
634
+ /** Is an a-rate AudioParam representing detuning of the frequency in cents. */
651
635
val detune : AudioParam = js.native
652
636
653
- /** Is a k-rate AudioParam, a double representing a Q factor, or quality factor.
654
- */
637
+ /** Is a k-rate AudioParam, a double representing a Q factor, or quality factor. */
655
638
val Q : AudioParam = js.native
656
639
657
- /** Is a k-rate AudioParam, a double representing the gain used in the current filtering algorithm.
658
- */
640
+ /** Is a k-rate AudioParam, a double representing the gain used in the current filtering algorithm. */
659
641
val gain : AudioParam = js.native
660
642
661
- /** Is a string value defining the kind of filtering algorithm the node is implementing.
662
- */
643
+ /** Is a string value defining the kind of filtering algorithm the node is implementing. */
663
644
var `type` : String = js.native
664
645
665
646
/** From the current filter parameter settings this method calculates the frequency response for frequencies specified
@@ -778,8 +759,7 @@ trait DelayNode extends AudioNode {
778
759
@ js.native
779
760
trait DynamicsCompressorNode extends AudioNode {
780
761
781
- /** Is a k-rate AudioParam representing the decibel value above which the compression will start taking effect.
782
- */
762
+ /** Is a k-rate AudioParam representing the decibel value above which the compression will start taking effect. */
783
763
val threshold : AudioParam = js.native
784
764
785
765
/** Is a k-rate AudioParam containing a decibel value representing the range above the threshold where the curve
@@ -797,12 +777,10 @@ trait DynamicsCompressorNode extends AudioNode {
797
777
*/
798
778
val reduction : AudioParam = js.native
799
779
800
- /** Is a k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB.
801
- */
780
+ /** Is a k-rate AudioParam representing the amount of time, in seconds, required to reduce the gain by 10 dB. */
802
781
val attack : AudioParam = js.native
803
782
804
- /** Is a k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB.
805
- */
783
+ /** Is a k-rate AudioParam representing the amount of time, in seconds, required to increase the gain by 10 dB. */
806
784
val release : AudioParam = js.native
807
785
}
808
786
@@ -909,8 +887,7 @@ trait OscillatorNode extends AudioNode {
909
887
*/
910
888
var detune : AudioParam = js.native
911
889
912
- /** Represents the shape of the oscillator wave generated. Different waves will produce different tones.
913
- */
890
+ /** Represents the shape of the oscillator wave generated. Different waves will produce different tones. */
914
891
var `type` : String = js.native // Not sure if this is correct ...
915
892
916
893
/** This method specifies the exact time to start playing the tone. */
@@ -926,8 +903,7 @@ trait OscillatorNode extends AudioNode {
926
903
*/
927
904
def setPeriodicWave (wave : PeriodicWave ): Unit = js.native
928
905
929
- /** Used to set the event handler for the ended event, which fires when the tone has stopped playing.
930
- */
906
+ /** Used to set the event handler for the ended event, which fires when the tone has stopped playing. */
931
907
var onended : js.Function1 [Event , _] = js.native
932
908
}
933
909
@@ -949,8 +925,7 @@ trait OscillatorNode extends AudioNode {
949
925
@ js.native
950
926
trait PannerNode extends AudioNode {
951
927
952
- /** Is an enumerated value determining which spatialisation algorithm to use to position the audio in 3D space.
953
- */
928
+ /** Is an enumerated value determining which spatialisation algorithm to use to position the audio in 3D space. */
954
929
var panningModel : String = js.native
955
930
956
931
/** Is an enumerated value determining which algorithm to use to reduce the volume of the audio source as it moves
@@ -1097,16 +1072,13 @@ trait WaveShaperNode extends AudioNode {
1097
1072
@ js.native
1098
1073
trait AudioBuffer extends js.Object {
1099
1074
1100
- /** Returns a float representing the sample rate, in samples per second, of the PCM data stored in the buffer.
1101
- */
1075
+ /** Returns a float representing the sample rate, in samples per second, of the PCM data stored in the buffer. */
1102
1076
val sampleRate : Double = js.native
1103
1077
1104
- /** Returns an integer representing the length, in sample-frames, of the PCM data stored in the buffer.
1105
- */
1078
+ /** Returns an integer representing the length, in sample-frames, of the PCM data stored in the buffer. */
1106
1079
val length : Int = js.native
1107
1080
1108
- /** Returns a double representing the duration, in seconds, of the PCM data stored in the buffer.
1109
- */
1081
+ /** Returns a double representing the duration, in seconds, of the PCM data stored in the buffer. */
1110
1082
val duration : Double = js.native
1111
1083
1112
1084
/** Returns an integer representing the number of discrete audio channels described by the PCM data stored in the
@@ -1158,8 +1130,7 @@ trait AudioBuffer extends js.Object {
1158
1130
@ js.native
1159
1131
trait OfflineAudioCompletionEvent extends Event {
1160
1132
1161
- /** The buffer containing the result of the processing of an OfflineAudioContext.
1162
- */
1133
+ /** The buffer containing the result of the processing of an OfflineAudioContext. */
1163
1134
val renderedBuffer : AudioBuffer = js.native
1164
1135
}
1165
1136
0 commit comments