Documentation ¶
Overview ¶
Package webaudio implements the WebAudio domain. This domain allows inspection of Web Audio API. https://webaudio.github.io/web-audio-api/
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type BaseAudioContext
- type ContextChangedClient
- type ContextChangedReply
- type ContextCreatedClient
- type ContextCreatedReply
- type ContextDestroyedClient
- type ContextDestroyedReply
- type ContextID
- type ContextRealtimeData
- type ContextState
- type ContextType
- type GetRealtimeDataArgs
- type GetRealtimeDataReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseAudioContext ¶
type BaseAudioContext struct { ContextID ContextID `json:"contextId"` // No description. ContextType ContextType `json:"contextType"` // No description. ContextState ContextState `json:"contextState"` // No description. RealtimeData *ContextRealtimeData `json:"realtimeData,omitempty"` // No description. CallbackBufferSize float64 `json:"callbackBufferSize"` // Platform-dependent callback buffer size. MaxOutputChannelCount float64 `json:"maxOutputChannelCount"` // Number of output channels supported by audio hardware in use. SampleRate float64 `json:"sampleRate"` // Context sample rate. }
BaseAudioContext Protocol object for BaseAudioContext
type ContextChangedClient ¶
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 }
ContextChangedClient is a client for ContextChanged events. Notifies that existing BaseAudioContext has changed some properties (id stays the same)..
type ContextChangedReply ¶
type ContextChangedReply struct {
Context BaseAudioContext `json:"context"` // No description.
}
ContextChangedReply is the reply for ContextChanged events.
type ContextCreatedClient ¶
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 }
ContextCreatedClient is a client for ContextCreated events. Notifies that a new BaseAudioContext has been created.
type ContextCreatedReply ¶
type ContextCreatedReply struct {
Context BaseAudioContext `json:"context"` // No description.
}
ContextCreatedReply is the reply for ContextCreated events.
type ContextDestroyedClient ¶
type ContextDestroyedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ContextDestroyedReply, error) rpcc.Stream }
ContextDestroyedClient is a client for ContextDestroyed events. Notifies that existing BaseAudioContext has been destroyed.
type ContextDestroyedReply ¶
type ContextDestroyedReply struct {
ContextID ContextID `json:"contextId"` // No description.
}
ContextDestroyedReply is the reply for ContextDestroyed events.
type ContextRealtimeData ¶
type ContextRealtimeData struct { CurrentTime *float64 `json:"currentTime,omitempty"` // The current context time in second in BaseAudioContext. RenderCapacity *float64 `json:"renderCapacity,omitempty"` // The time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur. }
ContextRealtimeData Fields in AudioContext that change in real-time. These are not updated on OfflineAudioContext.
type ContextState ¶
type ContextState string
ContextState Enum of AudioContextState from the spec
const ( ContextStateNotSet ContextState = "" ContextStateSuspended ContextState = "suspended" ContextStateRunning ContextState = "running" ContextStateClosed ContextState = "closed" )
ContextState as enums.
func (ContextState) String ¶
func (e ContextState) String() string
func (ContextState) Valid ¶
func (e ContextState) Valid() bool
type ContextType ¶
type ContextType string
ContextType Enum of BaseAudioContext types
const ( ContextTypeNotSet ContextType = "" ContextTypeRealtime ContextType = "realtime" ContextTypeOffline ContextType = "offline" )
ContextType as enums.
func (ContextType) String ¶
func (e ContextType) String() string
func (ContextType) Valid ¶
func (e ContextType) Valid() bool
type GetRealtimeDataArgs ¶
type GetRealtimeDataArgs struct {
ContextID ContextID `json:"contextId"` // No description.
}
GetRealtimeDataArgs represents the arguments for GetRealtimeData in the WebAudio domain.
func NewGetRealtimeDataArgs ¶
func NewGetRealtimeDataArgs(contextID ContextID) *GetRealtimeDataArgs
NewGetRealtimeDataArgs initializes GetRealtimeDataArgs with the required arguments.
type GetRealtimeDataReply ¶
type GetRealtimeDataReply struct {
RealtimeData ContextRealtimeData `json:"realtimeData"` // No description.
}
GetRealtimeDataReply represents the return values for GetRealtimeData in the WebAudio domain.