resampler

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NOT_FILLED                 = (iota - 1) // Not filled
	LINEAR_INTERPOLATION                    // Linear interpolation
	POLYNOMIAL_INTERPOLATION                // Polynomial interpolation
	BAND_LIMITED_INTERPOLATION              // Band limited interpolation
	FRACTIONAL_DELAY_FILTER
)

Resampler struct to hold resampler information only

Variables

View Source
var RESAMPLER_METHODS = map[int]string{
	NOT_FILLED:               "NOT_FILLED",
	LINEAR_INTERPOLATION:     "LINEAR_INTERPOLATION",
	POLYNOMIAL_INTERPOLATION: "POLYNOMIAL_INTERPOLATION",
}

RESAMPLER_METHODS is a map of resampler methods

Functions

func ResampleBytes added in v0.1.5

func ResampleBytes(in *sopro.In, out *sopro.Out, rs *Resampler) (int, error)

func ValidateInput added in v0.1.5

func ValidateInput(in *sopro.In) error

func ValidateOutput added in v0.1.5

func ValidateOutput(out *sopro.Out) error

func ValidateTranscoder added in v0.1.5

func ValidateTranscoder(rs *Resampler) error

Types

type Resampler added in v0.1.5

type Resampler struct {
	MethodR                int               // MethodR is the method of resampling if needed. Default is 0 (no resampling)
	MethodRAdvancedConfigs interface{}       // MethodAdvancedConfigs is the method of advanced configs if needed
	SizeBuffer             int               // SizeBuffer is the size of the buffer used in the resampling process.Default is 1024
	InConfigs              sopro.AudioConfig // the source configuration
	OutConfigs             sopro.AudioConfig // the target configuration
	Verbose                bool              // if true, the resampling process will be verbose
}

func (*Resampler) Println added in v0.1.5

func (rs *Resampler) Println(items ...any)

Println prints the items if the transcoder is in verbose mode

func (*Resampler) Wav added in v0.1.5

func (rs *Resampler) Wav(in *sopro.In, out *sopro.Out) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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