astiaudio

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertBitDepth

func ConvertBitDepth(srcSample int32, srcBitDepth, dstBitDepth int) (dstSample int32, err error)

ConvertBitDepth converts the bit depth

func ConvertSampleRate

func ConvertSampleRate(srcSamples []int32, srcSampleRate, dstSampleRate int) (dstSamples []int32, err error)

ConvertSampleRate converts the sample rate

Types

type SilenceDetector

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

SilenceDetector represents a silence detector

func NewSilenceDetector

func NewSilenceDetector(c SilenceDetectorConfiguration) (d *SilenceDetector)

NewSilenceDetector creates a new silence detector

func (*SilenceDetector) Add

func (d *SilenceDetector) Add(samples []int32, sampleRate int, silenceMaxAudioLevel float64) (validSamples [][]int32)

Add adds samples to the buffer and checks whether there are valid samples between silences

func (*SilenceDetector) Reset

func (d *SilenceDetector) Reset()

Reset resets the silence detector

type SilenceDetectorConfiguration

type SilenceDetectorConfiguration struct {
	SilenceMinDuration time.Duration `toml:"silence_min_duration"`
	StepDuration       time.Duration `toml:"step_duration"`
}

SilenceDetectorConfiguration represents a silence detector configuration

Jump to

Keyboard shortcuts

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