oversampling

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ATTENUATION_HALF_DECIBEL     = 0.9440608762859234
	LOOKAHEAD_SAMPLES_ONE_SIDE   = 4
	LOOKAHEAD_SAMPLES_BOTH_SIDES = 2 * LOOKAHEAD_SAMPLES_ONE_SIDE
)

* Global constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type OversamplerDecimator

type OversamplerDecimator interface {
	Oversample(in []float64, out []float64) error
	Decimate(in []float64, out []float64) error
}

* An oversampler / decimator increases or decreases the sample rate of a * signal by a constant factor. * * When oversampling the signal, band-limited interpolation is applied. * * When decimating (downsampling) the signal, a band-limiting filter is * applied to prevent aliasing.

func CreateOversamplerDecimator

func CreateOversamplerDecimator(factor uint32) OversamplerDecimator

* Creates an oversampler / decimator with the requested oversampling factor. * * The oversampling factor can be either 1, 2 or 4. * * (An oversampler / decimator with an oversampling factor of one technically * just copies buffers when oversampling / decimating though.)

Jump to

Keyboard shortcuts

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