Documentation
¶
Index ¶
- Constants
- type AAudioClientProxy
- type AAudioClientStub
- type AAudioServiceProxy
- func (p *AAudioServiceProxy) AsBinder() binder.IBinder
- func (p *AAudioServiceProxy) CloseStream(ctx context.Context, streamHandle int32) (int32, error)
- func (p *AAudioServiceProxy) ExitStandby(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
- func (p *AAudioServiceProxy) FlushStream(ctx context.Context, streamHandle int32) (int32, error)
- func (p *AAudioServiceProxy) GetStreamDescription(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
- func (p *AAudioServiceProxy) OpenStream(ctx context.Context, request StreamRequest, paramsOut StreamParameters) (int32, error)
- func (p *AAudioServiceProxy) PauseStream(ctx context.Context, streamHandle int32) (int32, error)
- func (p *AAudioServiceProxy) RegisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32, ...) (int32, error)
- func (p *AAudioServiceProxy) RegisterClient(ctx context.Context, client IAAudioClient) error
- func (p *AAudioServiceProxy) StartStream(ctx context.Context, streamHandle int32) (int32, error)
- func (p *AAudioServiceProxy) StopStream(ctx context.Context, streamHandle int32) (int32, error)
- func (p *AAudioServiceProxy) UnregisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32) (int32, error)
- type AAudioServiceStub
- type Endpoint
- type IAAudioClient
- type IAAudioClientServer
- type IAAudioService
- type IAAudioServiceServer
- type RingBuffer
- type SharedRegion
- type StreamParameters
- type StreamRequest
Constants ¶
const ( TransactionIAAudioServiceRegisterClient = binder.FirstCallTransaction + 0 TransactionIAAudioServiceOpenStream = binder.FirstCallTransaction + 1 TransactionIAAudioServiceCloseStream = binder.FirstCallTransaction + 2 TransactionIAAudioServiceGetStreamDescription = binder.FirstCallTransaction + 3 TransactionIAAudioServiceStartStream = binder.FirstCallTransaction + 4 TransactionIAAudioServicePauseStream = binder.FirstCallTransaction + 5 TransactionIAAudioServiceStopStream = binder.FirstCallTransaction + 6 TransactionIAAudioServiceFlushStream = binder.FirstCallTransaction + 7 TransactionIAAudioServiceRegisterAudioThread = binder.FirstCallTransaction + 8 TransactionIAAudioServiceUnregisterAudioThread = binder.FirstCallTransaction + 9 TransactionIAAudioServiceExitStandby = binder.FirstCallTransaction + 10 )
const ( MethodIAAudioServiceRegisterClient = "registerClient" MethodIAAudioServiceOpenStream = "openStream" MethodIAAudioServiceCloseStream = "closeStream" MethodIAAudioServiceGetStreamDescription = "getStreamDescription" MethodIAAudioServiceStartStream = "startStream" MethodIAAudioServicePauseStream = "pauseStream" MethodIAAudioServiceStopStream = "stopStream" MethodIAAudioServiceFlushStream = "flushStream" MethodIAAudioServiceRegisterAudioThread = "registerAudioThread" MethodIAAudioServiceUnregisterAudioThread = "unregisterAudioThread" MethodIAAudioServiceExitStandby = "exitStandby" )
const DescriptorIAAudioClient = "aaudio.IAAudioClient"
const DescriptorIAAudioService = "aaudio.IAAudioService"
const (
MethodIAAudioClientOnStreamChange = "onStreamChange"
)
const (
TransactionIAAudioClientOnStreamChange = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AAudioClientProxy ¶
func NewAAudioClientProxy ¶
func NewAAudioClientProxy( remote binder.IBinder, ) *AAudioClientProxy
func (*AAudioClientProxy) AsBinder ¶
func (p *AAudioClientProxy) AsBinder() binder.IBinder
func (*AAudioClientProxy) OnStreamChange ¶
type AAudioClientStub ¶
type AAudioClientStub struct {
Impl IAAudioClient
Transport binder.VersionAwareTransport
}
AAudioClientStub dispatches incoming binder transactions to a typed IAAudioClient implementation.
func (*AAudioClientStub) Descriptor ¶
func (s *AAudioClientStub) Descriptor() string
func (*AAudioClientStub) OnTransaction ¶
func (s *AAudioClientStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type AAudioServiceProxy ¶
func NewAAudioServiceProxy ¶
func NewAAudioServiceProxy( remote binder.IBinder, ) *AAudioServiceProxy
func (*AAudioServiceProxy) AsBinder ¶
func (p *AAudioServiceProxy) AsBinder() binder.IBinder
func (*AAudioServiceProxy) CloseStream ¶
func (*AAudioServiceProxy) ExitStandby ¶
func (*AAudioServiceProxy) FlushStream ¶
func (*AAudioServiceProxy) GetStreamDescription ¶
func (*AAudioServiceProxy) OpenStream ¶
func (p *AAudioServiceProxy) OpenStream( ctx context.Context, request StreamRequest, paramsOut StreamParameters, ) (int32, error)
func (*AAudioServiceProxy) PauseStream ¶
func (*AAudioServiceProxy) RegisterAudioThread ¶
func (*AAudioServiceProxy) RegisterClient ¶
func (p *AAudioServiceProxy) RegisterClient( ctx context.Context, client IAAudioClient, ) error
func (*AAudioServiceProxy) StartStream ¶
func (*AAudioServiceProxy) StopStream ¶
func (*AAudioServiceProxy) UnregisterAudioThread ¶
type AAudioServiceStub ¶
type AAudioServiceStub struct {
Impl IAAudioService
Transport binder.VersionAwareTransport
}
AAudioServiceStub dispatches incoming binder transactions to a typed IAAudioService implementation.
func (*AAudioServiceStub) Descriptor ¶
func (s *AAudioServiceStub) Descriptor() string
func (*AAudioServiceStub) OnTransaction ¶
func (s *AAudioServiceStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type Endpoint ¶
type Endpoint struct {
UpMessageQueueParcelable RingBuffer
DownMessageQueueParcelable RingBuffer
UpDataQueueParcelable RingBuffer
DownDataQueueParcelable RingBuffer
}
type IAAudioClient ¶
type IAAudioClient interface {
AsBinder() binder.IBinder
OnStreamChange(ctx context.Context, handle int32, opcode int32, value int32) error
}
func NewAAudioClientStub ¶
func NewAAudioClientStub( impl IAAudioClientServer, ) IAAudioClient
NewAAudioClientStub creates a server-side IAAudioClient wrapping the given server implementation. The returned value satisfies IAAudioClient and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IAAudioClientServer ¶
type IAAudioClientServer interface {
OnStreamChange(ctx context.Context, handle int32, opcode int32, value int32) error
}
IAAudioClientServer is the server-side interface that user implementations provide to NewAAudioClientStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IAAudioService ¶
type IAAudioService interface {
AsBinder() binder.IBinder
RegisterClient(ctx context.Context, client IAAudioClient) error
OpenStream(ctx context.Context, request StreamRequest, paramsOut StreamParameters) (int32, error)
CloseStream(ctx context.Context, streamHandle int32) (int32, error)
GetStreamDescription(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
StartStream(ctx context.Context, streamHandle int32) (int32, error)
PauseStream(ctx context.Context, streamHandle int32) (int32, error)
StopStream(ctx context.Context, streamHandle int32) (int32, error)
FlushStream(ctx context.Context, streamHandle int32) (int32, error)
RegisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32, periodNanoseconds int64) (int32, error)
UnregisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32) (int32, error)
ExitStandby(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
}
func NewAAudioServiceStub ¶
func NewAAudioServiceStub( impl IAAudioServiceServer, ) IAAudioService
NewAAudioServiceStub creates a server-side IAAudioService wrapping the given server implementation. The returned value satisfies IAAudioService and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IAAudioServiceServer ¶
type IAAudioServiceServer interface {
RegisterClient(ctx context.Context, client IAAudioClient) error
OpenStream(ctx context.Context, request StreamRequest, paramsOut StreamParameters) (int32, error)
CloseStream(ctx context.Context, streamHandle int32) (int32, error)
GetStreamDescription(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
StartStream(ctx context.Context, streamHandle int32) (int32, error)
PauseStream(ctx context.Context, streamHandle int32) (int32, error)
StopStream(ctx context.Context, streamHandle int32) (int32, error)
FlushStream(ctx context.Context, streamHandle int32) (int32, error)
RegisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32, periodNanoseconds int64) (int32, error)
UnregisterAudioThread(ctx context.Context, streamHandle int32, clientThreadId int32) (int32, error)
ExitStandby(ctx context.Context, streamHandle int32, endpoint Endpoint) (int32, error)
}
IAAudioServiceServer is the server-side interface that user implementations provide to NewAAudioServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type RingBuffer ¶
type RingBuffer struct {
ReadCounterParcelable SharedRegion
WriteCounterParcelable SharedRegion
DataParcelable SharedRegion
BytesPerFrame int32
FramesPerBurst int32
CapacityInFrames int32
Flags int32
}
func (*RingBuffer) MarshalParcel ¶
func (s *RingBuffer) MarshalParcel( p *parcel.Parcel, ) error
func (*RingBuffer) UnmarshalParcel ¶
func (s *RingBuffer) UnmarshalParcel( p *parcel.Parcel, ) error
type SharedRegion ¶
type SharedRegion struct {
}
func (*SharedRegion) MarshalParcel ¶
func (s *SharedRegion) MarshalParcel( p *parcel.Parcel, ) error
func (*SharedRegion) UnmarshalParcel ¶
func (s *SharedRegion) UnmarshalParcel( p *parcel.Parcel, ) error
type StreamParameters ¶
type StreamParameters struct {
ChannelMask int32
SampleRate int32
DeviceId int32
SharingMode int32
AudioFormat common.AudioFormatDescription
Direction int32
Usage int32
ContentType int32
SpatializationBehavior int32
IsContentSpatialized bool
InputPreset int32
BufferCapacity int32
AllowedCapturePolicy int32
SessionId int32
IsPrivacySensitive bool
HardwareSamplesPerFrame int32
HardwareSampleRate int32
HardwareAudioFormat common.AudioFormatDescription
}
func (*StreamParameters) MarshalParcel ¶
func (s *StreamParameters) MarshalParcel( p *parcel.Parcel, ) error
func (*StreamParameters) UnmarshalParcel ¶
func (s *StreamParameters) UnmarshalParcel( p *parcel.Parcel, ) error
type StreamRequest ¶
type StreamRequest struct {
Params StreamParameters
AttributionSource content.AttributionSourceState
SharingModeMatchRequired bool
InService bool
}
func (*StreamRequest) MarshalParcel ¶
func (s *StreamRequest) MarshalParcel( p *parcel.Parcel, ) error
func (*StreamRequest) UnmarshalParcel ¶
func (s *StreamRequest) UnmarshalParcel( p *parcel.Parcel, ) error