-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathWebAudio.patch
More file actions
21 lines (19 loc) · 1.24 KB
/
WebAudio.patch
File metadata and controls
21 lines (19 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/Sources/WebAudio/Generated.swift
+++ b/Sources/WebAudio/Generated.swift
@@ -195,7 +195,8 @@ public class AudioBufferSourceNode: AudioScheduledSourceNode {
@ReadWriteAttribute
public var loopEnd: Double
- @inlinable override public func start(when: Double? = nil, offset: Double? = nil, duration: Double? = nil) {
+ // `override` removed since the superclass function has fewer parameters
+ @inlinable func start(when: Double? = nil, offset: Double? = nil, duration: Double? = nil) {
let this = jsObject
_ = this[Strings.start].function!(this: this, arguments: [_toJSValue(when), _toJSValue(offset), _toJSValue(duration)])
}
@@ -492,7 +493,7 @@ public class AudioNode: EventTarget {
super.init(unsafelyWrapping: jsObject)
}
- @inlinable public func connect(destinationNode: AudioNode, output: UInt32? = nil, input: UInt32? = nil) -> AudioNode {
+ @discardableResult @inlinable public func connect<NodeType: AudioNode>(destinationNode: NodeType, output: UInt32? = nil, input: UInt32? = nil) -> NodeType {
let this = jsObject
return this[Strings.connect].function!(this: this, arguments: [_toJSValue(destinationNode), _toJSValue(output), _toJSValue(input)]).fromJSValue()!
}