Help us shape the future of Go! Take the 2026 Go Developer Survey

sounddose

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionISoundDoseSetOutputRs2UpperBound    = binder.FirstCallTransaction + 0
	TransactionISoundDoseGetOutputRs2UpperBound    = binder.FirstCallTransaction + 1
	TransactionISoundDoseRegisterSoundDoseCallback = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodISoundDoseSetOutputRs2UpperBound    = "setOutputRs2UpperBound"
	MethodISoundDoseGetOutputRs2UpperBound    = "getOutputRs2UpperBound"
	MethodISoundDoseRegisterSoundDoseCallback = "registerSoundDoseCallback"
)
View Source
const (
	ISoundDoseDefaultMaxRs2 int32 = 100
	ISoundDoseMinRs2        int32 = 80
)
View Source
const (
	TransactionISoundDoseIHalSoundDoseCallbackOnMomentaryExposureWarning = binder.FirstCallTransaction + 0
	TransactionISoundDoseIHalSoundDoseCallbackOnNewMelValues             = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodISoundDoseIHalSoundDoseCallbackOnMomentaryExposureWarning = "onMomentaryExposureWarning"
	MethodISoundDoseIHalSoundDoseCallbackOnNewMelValues             = "onNewMelValues"
)
View Source
const DescriptorISoundDose = "android.hardware.audio.core.sounddose.ISoundDose"
View Source
const DescriptorISoundDoseIHalSoundDoseCallback = "android.hardware.audio.core.sounddose.ISoundDose.IHalSoundDoseCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type ISoundDose

type ISoundDose interface {
	AsBinder() binder.IBinder
	SetOutputRs2UpperBound(ctx context.Context, rs2ValueDbA float32) error
	GetOutputRs2UpperBound(ctx context.Context) (float32, error)
	RegisterSoundDoseCallback(ctx context.Context, callback ISoundDoseIHalSoundDoseCallback) error
}

func NewSoundDoseStub

func NewSoundDoseStub(
	impl ISoundDoseServer,
) ISoundDose

NewSoundDoseStub creates a server-side ISoundDose wrapping the given server implementation. The returned value satisfies ISoundDose 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 ISoundDoseIHalSoundDoseCallback

type ISoundDoseIHalSoundDoseCallback interface {
	AsBinder() binder.IBinder
	OnMomentaryExposureWarning(ctx context.Context, currentDbA float32, audioDevice common.AudioDevice) error
	OnNewMelValues(ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, audioDevice common.AudioDevice) error
}

func NewSoundDoseIHalSoundDoseCallbackStub

func NewSoundDoseIHalSoundDoseCallbackStub(
	impl ISoundDoseIHalSoundDoseCallbackServer,
) ISoundDoseIHalSoundDoseCallback

NewSoundDoseIHalSoundDoseCallbackStub creates a server-side ISoundDoseIHalSoundDoseCallback wrapping the given server implementation. The returned value satisfies ISoundDoseIHalSoundDoseCallback 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 ISoundDoseIHalSoundDoseCallbackMelRecord

type ISoundDoseIHalSoundDoseCallbackMelRecord struct {
	MelValues []float32
	Timestamp int64
}

func (*ISoundDoseIHalSoundDoseCallbackMelRecord) MarshalParcel

func (*ISoundDoseIHalSoundDoseCallbackMelRecord) UnmarshalParcel

func (s *ISoundDoseIHalSoundDoseCallbackMelRecord) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ISoundDoseIHalSoundDoseCallbackServer

type ISoundDoseIHalSoundDoseCallbackServer interface {
	OnMomentaryExposureWarning(ctx context.Context, currentDbA float32, audioDevice common.AudioDevice) error
	OnNewMelValues(ctx context.Context, melRecord ISoundDoseIHalSoundDoseCallbackMelRecord, audioDevice common.AudioDevice) error
}

ISoundDoseIHalSoundDoseCallbackServer is the server-side interface that user implementations provide to NewSoundDoseIHalSoundDoseCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISoundDoseServer

type ISoundDoseServer interface {
	SetOutputRs2UpperBound(ctx context.Context, rs2ValueDbA float32) error
	GetOutputRs2UpperBound(ctx context.Context) (float32, error)
	RegisterSoundDoseCallback(ctx context.Context, callback ISoundDoseIHalSoundDoseCallback) error
}

ISoundDoseServer is the server-side interface that user implementations provide to NewSoundDoseStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type SoundDoseIHalSoundDoseCallbackProxy

type SoundDoseIHalSoundDoseCallbackProxy struct {
	Remote binder.IBinder
}

func NewSoundDoseIHalSoundDoseCallbackProxy

func NewSoundDoseIHalSoundDoseCallbackProxy(
	remote binder.IBinder,
) *SoundDoseIHalSoundDoseCallbackProxy

func (*SoundDoseIHalSoundDoseCallbackProxy) AsBinder

func (*SoundDoseIHalSoundDoseCallbackProxy) OnMomentaryExposureWarning

func (p *SoundDoseIHalSoundDoseCallbackProxy) OnMomentaryExposureWarning(
	ctx context.Context,
	currentDbA float32,
	audioDevice common.AudioDevice,
) error

func (*SoundDoseIHalSoundDoseCallbackProxy) OnNewMelValues

type SoundDoseIHalSoundDoseCallbackStub

type SoundDoseIHalSoundDoseCallbackStub struct {
	Impl      ISoundDoseIHalSoundDoseCallback
	Transport binder.VersionAwareTransport
}

SoundDoseIHalSoundDoseCallbackStub dispatches incoming binder transactions to a typed ISoundDoseIHalSoundDoseCallback implementation.

func (*SoundDoseIHalSoundDoseCallbackStub) Descriptor

func (*SoundDoseIHalSoundDoseCallbackStub) OnTransaction

type SoundDoseProxy

type SoundDoseProxy struct {
	Remote binder.IBinder
}

func NewSoundDoseProxy

func NewSoundDoseProxy(
	remote binder.IBinder,
) *SoundDoseProxy

func (*SoundDoseProxy) AsBinder

func (p *SoundDoseProxy) AsBinder() binder.IBinder

func (*SoundDoseProxy) GetOutputRs2UpperBound

func (p *SoundDoseProxy) GetOutputRs2UpperBound(
	ctx context.Context,
) (float32, error)

func (*SoundDoseProxy) RegisterSoundDoseCallback

func (p *SoundDoseProxy) RegisterSoundDoseCallback(
	ctx context.Context,
	callback ISoundDoseIHalSoundDoseCallback,
) error

func (*SoundDoseProxy) SetOutputRs2UpperBound

func (p *SoundDoseProxy) SetOutputRs2UpperBound(
	ctx context.Context,
	rs2ValueDbA float32,
) error

type SoundDoseStub

type SoundDoseStub struct {
	Impl      ISoundDose
	Transport binder.VersionAwareTransport
}

SoundDoseStub dispatches incoming binder transactions to a typed ISoundDose implementation.

func (*SoundDoseStub) Descriptor

func (s *SoundDoseStub) Descriptor() string

func (*SoundDoseStub) OnTransaction

func (s *SoundDoseStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

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