Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultAudioLevelConfig = AudioLevelConfig{
ActiveLevel: 35,
MinPercentile: 40,
UpdateInterval: 400,
SmoothIntervals: 2,
}
)
Functions ¶
func ConvertAudioLevel ¶
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
type AudioLevelConfig ¶ added in v1.8.1
type AudioLevelConfig struct {
// minimum level to be considered active, 0-127, where 0 is loudest
ActiveLevel uint8 `yaml:"active_level,omitempty"`
// percentile to measure, a participant is considered active if it has exceeded the ActiveLevel more than
// MinPercentile% of the time
MinPercentile uint8 `yaml:"min_percentile,omitempty"`
// interval to update clients, in ms
UpdateInterval uint32 `yaml:"update_interval,omitempty"`
// smoothing for audioLevel values sent to the client.
// audioLevel will be an average of `smooth_intervals`, 0 to disable
SmoothIntervals uint32 `yaml:"smooth_intervals,omitempty"`
}
type AudioLevelParams ¶
type AudioLevelParams struct {
Config AudioLevelConfig
}
Click to show internal directories.
Click to hide internal directories.