/
event.go
208 lines (180 loc) · 8.6 KB
/
event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// Code generated by cdpgen. DO NOT EDIT.
package webaudio
import (
"github.com/mafredri/cdp/rpcc"
)
// ContextCreatedClient is a client for ContextCreated events. Notifies that a
// new BaseAudioContext has been created.
type ContextCreatedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*ContextCreatedReply, error)
rpcc.Stream
}
// ContextCreatedReply is the reply for ContextCreated events.
type ContextCreatedReply struct {
Context BaseAudioContext `json:"context"` // No description.
}
// ContextWillBeDestroyedClient is a client for ContextWillBeDestroyed events.
// Notifies that an existing BaseAudioContext will be destroyed.
type ContextWillBeDestroyedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*ContextWillBeDestroyedReply, error)
rpcc.Stream
}
// ContextWillBeDestroyedReply is the reply for ContextWillBeDestroyed events.
type ContextWillBeDestroyedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
}
// ContextChangedClient is a client for ContextChanged events. Notifies that
// existing BaseAudioContext has changed some properties (id stays the same)..
type ContextChangedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*ContextChangedReply, error)
rpcc.Stream
}
// ContextChangedReply is the reply for ContextChanged events.
type ContextChangedReply struct {
Context BaseAudioContext `json:"context"` // No description.
}
// AudioListenerCreatedClient is a client for AudioListenerCreated events.
// Notifies that the construction of an AudioListener has finished.
type AudioListenerCreatedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioListenerCreatedReply, error)
rpcc.Stream
}
// AudioListenerCreatedReply is the reply for AudioListenerCreated events.
type AudioListenerCreatedReply struct {
Listener AudioListener `json:"listener"` // No description.
}
// AudioListenerWillBeDestroyedClient is a client for AudioListenerWillBeDestroyed events.
// Notifies that a new AudioListener has been created.
type AudioListenerWillBeDestroyedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioListenerWillBeDestroyedReply, error)
rpcc.Stream
}
// AudioListenerWillBeDestroyedReply is the reply for AudioListenerWillBeDestroyed events.
type AudioListenerWillBeDestroyedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
ListenerID GraphObjectID `json:"listenerId"` // No description.
}
// AudioNodeCreatedClient is a client for AudioNodeCreated events. Notifies
// that a new AudioNode has been created.
type AudioNodeCreatedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioNodeCreatedReply, error)
rpcc.Stream
}
// AudioNodeCreatedReply is the reply for AudioNodeCreated events.
type AudioNodeCreatedReply struct {
Node AudioNode `json:"node"` // No description.
}
// AudioNodeWillBeDestroyedClient is a client for AudioNodeWillBeDestroyed events.
// Notifies that an existing AudioNode has been destroyed.
type AudioNodeWillBeDestroyedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioNodeWillBeDestroyedReply, error)
rpcc.Stream
}
// AudioNodeWillBeDestroyedReply is the reply for AudioNodeWillBeDestroyed events.
type AudioNodeWillBeDestroyedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
NodeID GraphObjectID `json:"nodeId"` // No description.
}
// AudioParamCreatedClient is a client for AudioParamCreated events. Notifies
// that a new AudioParam has been created.
type AudioParamCreatedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioParamCreatedReply, error)
rpcc.Stream
}
// AudioParamCreatedReply is the reply for AudioParamCreated events.
type AudioParamCreatedReply struct {
Param AudioParam `json:"param"` // No description.
}
// AudioParamWillBeDestroyedClient is a client for AudioParamWillBeDestroyed events.
// Notifies that an existing AudioParam has been destroyed.
type AudioParamWillBeDestroyedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*AudioParamWillBeDestroyedReply, error)
rpcc.Stream
}
// AudioParamWillBeDestroyedReply is the reply for AudioParamWillBeDestroyed events.
type AudioParamWillBeDestroyedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
NodeID GraphObjectID `json:"nodeId"` // No description.
ParamID GraphObjectID `json:"paramId"` // No description.
}
// NodesConnectedClient is a client for NodesConnected events. Notifies that
// two AudioNodes are connected.
type NodesConnectedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*NodesConnectedReply, error)
rpcc.Stream
}
// NodesConnectedReply is the reply for NodesConnected events.
type NodesConnectedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
SourceID GraphObjectID `json:"sourceId"` // No description.
DestinationID GraphObjectID `json:"destinationId"` // No description.
SourceOutputIndex *float64 `json:"sourceOutputIndex,omitempty"` // No description.
DestinationInputIndex *float64 `json:"destinationInputIndex,omitempty"` // No description.
}
// NodesDisconnectedClient is a client for NodesDisconnected events. Notifies
// that AudioNodes are disconnected. The destination can be null, and it means
// all the outgoing connections from the source are disconnected.
type NodesDisconnectedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*NodesDisconnectedReply, error)
rpcc.Stream
}
// NodesDisconnectedReply is the reply for NodesDisconnected events.
type NodesDisconnectedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
SourceID GraphObjectID `json:"sourceId"` // No description.
DestinationID GraphObjectID `json:"destinationId"` // No description.
SourceOutputIndex *float64 `json:"sourceOutputIndex,omitempty"` // No description.
DestinationInputIndex *float64 `json:"destinationInputIndex,omitempty"` // No description.
}
// NodeParamConnectedClient is a client for NodeParamConnected events.
// Notifies that an AudioNode is connected to an AudioParam.
type NodeParamConnectedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*NodeParamConnectedReply, error)
rpcc.Stream
}
// NodeParamConnectedReply is the reply for NodeParamConnected events.
type NodeParamConnectedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
SourceID GraphObjectID `json:"sourceId"` // No description.
DestinationID GraphObjectID `json:"destinationId"` // No description.
SourceOutputIndex *float64 `json:"sourceOutputIndex,omitempty"` // No description.
}
// NodeParamDisconnectedClient is a client for NodeParamDisconnected events.
// Notifies that an AudioNode is disconnected to an AudioParam.
type NodeParamDisconnectedClient interface {
// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
// triggered, context canceled or connection closed.
Recv() (*NodeParamDisconnectedReply, error)
rpcc.Stream
}
// NodeParamDisconnectedReply is the reply for NodeParamDisconnected events.
type NodeParamDisconnectedReply struct {
ContextID GraphObjectID `json:"contextId"` // No description.
SourceID GraphObjectID `json:"sourceId"` // No description.
DestinationID GraphObjectID `json:"destinationId"` // No description.
SourceOutputIndex *float64 `json:"sourceOutputIndex,omitempty"` // No description.
}