webaudio

package
v0.0.0-...-640e031 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package webaudio provides the Chrome DevTools Protocol commands, types, and events for the WebAudio domain.

This domain allows inspection of Web Audio API. https://webaudio.github.io/web-audio-api/.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable          = "WebAudio.enable"
	CommandDisable         = "WebAudio.disable"
	CommandGetRealtimeData = "WebAudio.getRealtimeData"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAudioContext

type BaseAudioContext struct {
	ContextID             ContextID            `json:"contextId"`
	ContextType           ContextType          `json:"contextType"`
	ContextState          ContextState         `json:"contextState"`
	RealtimeData          *ContextRealtimeData `json:"realtimeData,omitempty"`
	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.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-BaseAudioContext

func (BaseAudioContext) MarshalEasyJSON

func (v BaseAudioContext) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (BaseAudioContext) MarshalJSON

func (v BaseAudioContext) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*BaseAudioContext) UnmarshalEasyJSON

func (v *BaseAudioContext) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*BaseAudioContext) UnmarshalJSON

func (v *BaseAudioContext) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ContextID

type ContextID string

ContextID context's UUID in string.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextId

func (ContextID) String

func (t ContextID) String() string

String returns the ContextID as string value.

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.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextRealtimeData

func (ContextRealtimeData) MarshalEasyJSON

func (v ContextRealtimeData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ContextRealtimeData) MarshalJSON

func (v ContextRealtimeData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ContextRealtimeData) UnmarshalEasyJSON

func (v *ContextRealtimeData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ContextRealtimeData) UnmarshalJSON

func (v *ContextRealtimeData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ContextState

type ContextState string

ContextState enum of AudioContextState from the spec.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextState

const (
	ContextStateSuspended ContextState = "suspended"
	ContextStateRunning   ContextState = "running"
	ContextStateClosed    ContextState = "closed"
)

ContextState values.

func (ContextState) MarshalEasyJSON

func (t ContextState) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ContextState) MarshalJSON

func (t ContextState) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ContextState) String

func (t ContextState) String() string

String returns the ContextState as string value.

func (*ContextState) UnmarshalEasyJSON

func (t *ContextState) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ContextState) UnmarshalJSON

func (t *ContextState) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type ContextType

type ContextType string

ContextType enum of BaseAudioContext types.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#type-ContextType

const (
	ContextTypeRealtime ContextType = "realtime"
	ContextTypeOffline  ContextType = "offline"
)

ContextType values.

func (ContextType) MarshalEasyJSON

func (t ContextType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (ContextType) MarshalJSON

func (t ContextType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (ContextType) String

func (t ContextType) String() string

String returns the ContextType as string value.

func (*ContextType) UnmarshalEasyJSON

func (t *ContextType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*ContextType) UnmarshalJSON

func (t *ContextType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type DisableParams

type DisableParams struct{}

DisableParams disables the WebAudio domain.

func Disable

func Disable() *DisableParams

Disable disables the WebAudio domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes WebAudio.disable against the provided context.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams enables the WebAudio domain and starts sending context lifetime events.

func Enable

func Enable() *EnableParams

Enable enables the WebAudio domain and starts sending context lifetime events.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-enable

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes WebAudio.enable against the provided context.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventContextChanged

type EventContextChanged struct {
	Context *BaseAudioContext `json:"context"`
}

EventContextChanged notifies that existing BaseAudioContext has changed some properties (id stays the same)..

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextChanged

func (EventContextChanged) MarshalEasyJSON

func (v EventContextChanged) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventContextChanged) MarshalJSON

func (v EventContextChanged) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventContextChanged) UnmarshalEasyJSON

func (v *EventContextChanged) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventContextChanged) UnmarshalJSON

func (v *EventContextChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventContextCreated

type EventContextCreated struct {
	Context *BaseAudioContext `json:"context"`
}

EventContextCreated notifies that a new BaseAudioContext has been created.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextCreated

func (EventContextCreated) MarshalEasyJSON

func (v EventContextCreated) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventContextCreated) MarshalJSON

func (v EventContextCreated) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventContextCreated) UnmarshalEasyJSON

func (v *EventContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventContextCreated) UnmarshalJSON

func (v *EventContextCreated) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventContextDestroyed

type EventContextDestroyed struct {
	ContextID ContextID `json:"contextId"`
}

EventContextDestroyed notifies that existing BaseAudioContext has been destroyed.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#event-contextDestroyed

func (EventContextDestroyed) MarshalEasyJSON

func (v EventContextDestroyed) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventContextDestroyed) MarshalJSON

func (v EventContextDestroyed) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventContextDestroyed) UnmarshalEasyJSON

func (v *EventContextDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventContextDestroyed) UnmarshalJSON

func (v *EventContextDestroyed) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetRealtimeDataParams

type GetRealtimeDataParams struct {
	ContextID ContextID `json:"contextId"`
}

GetRealtimeDataParams fetch the realtime data from the registered contexts.

func GetRealtimeData

func GetRealtimeData(contextID ContextID) *GetRealtimeDataParams

GetRealtimeData fetch the realtime data from the registered contexts.

See: https://chromedevtools.github.io/devtools-protocol/tot/WebAudio#method-getRealtimeData

parameters:

contextID

func (*GetRealtimeDataParams) Do

func (p *GetRealtimeDataParams) Do(ctx context.Context) (realtimeData *ContextRealtimeData, err error)

Do executes WebAudio.getRealtimeData against the provided context.

returns:

realtimeData

func (GetRealtimeDataParams) MarshalEasyJSON

func (v GetRealtimeDataParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRealtimeDataParams) MarshalJSON

func (v GetRealtimeDataParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetRealtimeDataParams) UnmarshalEasyJSON

func (v *GetRealtimeDataParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRealtimeDataParams) UnmarshalJSON

func (v *GetRealtimeDataParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetRealtimeDataReturns

type GetRealtimeDataReturns struct {
	RealtimeData *ContextRealtimeData `json:"realtimeData,omitempty"`
}

GetRealtimeDataReturns return values.

func (GetRealtimeDataReturns) MarshalEasyJSON

func (v GetRealtimeDataReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRealtimeDataReturns) MarshalJSON

func (v GetRealtimeDataReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetRealtimeDataReturns) UnmarshalEasyJSON

func (v *GetRealtimeDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRealtimeDataReturns) UnmarshalJSON

func (v *GetRealtimeDataReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL