File tree 7 files changed +51
-5
lines changed
dom/src/main/scala/org/scalajs/dom
7 files changed +51
-5
lines changed Original file line number Diff line number Diff line change @@ -14,5 +14,7 @@ trait AudioBufferSourceNodeOptions extends js.Object {
14
14
var loopEnd : js.UndefOr [Double ] = js.undefined
15
15
var detune : js.UndefOr [Double ] = js.undefined
16
16
var playbackRate : js.UndefOr [Double ] = js.undefined
17
+ var channelCount : js.UndefOr [Int ] = js.undefined
18
+ var channelCountMode : js.UndefOr [AudioNodeChannelCountMode ] = js.undefined
19
+ var channelInterpretation : js.UndefOr [AudioNodeChannelInterpretation ] = js.undefined
17
20
}
18
-
Original file line number Diff line number Diff line change @@ -14,5 +14,4 @@ object AudioNodeChannelCountMode {
14
14
val max : AudioNodeChannelCountMode = " max" .asInstanceOf [AudioNodeChannelCountMode ]
15
15
val `clamped-max` : AudioNodeChannelCountMode = " clamped-max" .asInstanceOf [AudioNodeChannelCountMode ]
16
16
val explicit : AudioNodeChannelCountMode = " explicit" .asInstanceOf [AudioNodeChannelCountMode ]
17
-
18
17
}
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ trait AudioParam extends AudioNode {
36
36
/** Represents the initial value of the attributes as defined by the specific AudioNode creating the AudioParam. */
37
37
val defaultValue : Double = js.native
38
38
39
+ val maxValue : Double = js.native
40
+
41
+ val minValue : Double = js.native
42
+
39
43
/** Schedules an instant change to the value of the AudioParam at a precise time, as measured against
40
44
* AudioContext.currentTime. The new value is given in the value parameter.
41
45
*
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import scala.scalajs.js.annotation._
23
23
*/
24
24
@ JSGlobal
25
25
@ js.native
26
- class MediaElementAudioSourceNode (ctx : BaseAudioContext , options : MediaElementAudioSourceNodeOptions )
26
+ class MediaElementAudioSourceNode (context : BaseAudioContext , options : MediaElementAudioSourceNodeOptions )
27
27
extends AudioNode {
28
28
val mediaElement : HTMLMediaElement = js.native
29
29
}
Original file line number Diff line number Diff line change 6
6
package org .scalajs .dom
7
7
8
8
import scala .scalajs .js
9
+ import scala .scalajs .js .annotation ._
9
10
10
11
/** The OscillatorNode interface represents a periodic waveform, like a sine wave. It is an AudioNode audio-processing
11
12
* module that causes a given frequency of sine wave to be created — in effect, a constant tone.
@@ -19,8 +20,10 @@ import scala.scalajs.js
19
20
* - Channel count: 2 (not used in the default count mode)
20
21
* - Channel interpretation: speakers
21
22
*/
23
+ @ JSGlobal
22
24
@ js.native
23
- trait OscillatorNode extends AudioScheduledSourceNode {
25
+ class OscillatorNode (context : BaseAudioContext , options : OscillatorNodeOptions = js.native)
26
+ extends AudioScheduledSourceNode {
24
27
25
28
/** An a-rate AudioParam representing the frequency of oscillation in hertz (though the AudioParam returned is
26
29
* read-only, the value it represents is not.)
@@ -33,7 +36,7 @@ trait OscillatorNode extends AudioScheduledSourceNode {
33
36
var detune : AudioParam = js.native
34
37
35
38
/** Represents the shape of the oscillator wave generated. Different waves will produce different tones. */
36
- var `type` : String = js.native // Not sure if this is correct ...
39
+ var `type` : OscillatorNodeType = js.native // Not sure if this is correct ...
37
40
38
41
/** Used to point to a PeriodicWave defining a periodic waveform that can be used to shape the oscillator's output,
39
42
* when type = "custom" is used.
Original file line number Diff line number Diff line change
1
+ /** Documentation is thanks to Mozilla Contributors at https://developer.mozilla.org/en-US/docs/Web/API and available
2
+ * under the Creative Commons Attribution-ShareAlike v2.5 or later. http://creativecommons.org/licenses/by-sa/2.5/
3
+ *
4
+ * Everything else is under the MIT License http://opensource.org/licenses/MIT
5
+ */
6
+ package org .scalajs .dom
7
+
8
+ import scala .scalajs .js
9
+
10
+ trait OscillatorNodeOptions extends js.Object {
11
+ var `type` : js.UndefOr [OscillatorNodeType ] = js.undefined
12
+ var detune : js.UndefOr [Double ] = js.undefined
13
+ var frequency : js.UndefOr [Double ] = js.undefined
14
+ var periodicWave : js.UndefOr [PeriodicWave ] = js.undefined
15
+ var channelCount : js.UndefOr [Int ] = js.undefined
16
+ var channelCountMode : js.UndefOr [AudioNodeChannelCountMode ] = js.undefined
17
+ var channelInterpretation : js.UndefOr [AudioNodeChannelInterpretation ] = js.undefined
18
+ }
19
+
Original file line number Diff line number Diff line change
1
+ /** Documentation is thanks to Mozilla Contributors at https://developer.mozilla.org/en-US/docs/Web/API and available
2
+ * under the Creative Commons Attribution-ShareAlike v2.5 or later. http://creativecommons.org/licenses/by-sa/2.5/
3
+ *
4
+ * Everything else is under the MIT License http://opensource.org/licenses/MIT
5
+ */
6
+ package org .scalajs .dom
7
+
8
+ import scala .scalajs .js
9
+
10
+ @ js.native
11
+ sealed trait OscillatorNodeType extends js.Any
12
+
13
+ object OscillatorNodeType {
14
+ val sine : OscillatorNodeType = " sine" .asInstanceOf [OscillatorNodeType ]
15
+ val square : OscillatorNodeType = " square" .asInstanceOf [OscillatorNodeType ]
16
+ val sawtooth : OscillatorNodeType = " sawtooth" .asInstanceOf [OscillatorNodeType ]
17
+ val triangle : OscillatorNodeType = " triangle" .asInstanceOf [OscillatorNodeType ]
18
+ val custom : OscillatorNodeType = " custom" .asInstanceOf [OscillatorNodeType ]
19
+ }
You can’t perform that action at this time.
0 commit comments