audio

package
v0.0.0-...-6941808 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAudioLevel

func ConvertAudioLevel(level float64) float64

convert decibel back to linear

Types

type AudioLevel

type AudioLevel struct {
	// contains filtered or unexported fields
}

keeps track of audio level for a participant

func NewAudioLevel

func NewAudioLevel(params AudioLevelParams) *AudioLevel

func (*AudioLevel) GetLevel

func (l *AudioLevel) GetLevel(now int64) (float64, bool)

returns current smoothed audio level

func (*AudioLevel) Observe

func (l *AudioLevel) Observe(level uint8, durationMs uint32, arrivalTime int64)

Observes a new frame

type AudioLevelParams

type AudioLevelParams struct {
	ActiveLevel     uint8
	MinPercentile   uint8
	ObserveDuration uint32
	SmoothIntervals uint32
}

Jump to

Keyboard shortcuts

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