resample

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package resample provides a small pure-Go audio resample filter adapter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Descriptor

func Descriptor() filter.Descriptor

func Register

func Register(registry *filter.Registry)

Types

type Factory

type Factory struct{}

func NewFactory

func NewFactory() Factory

func (Factory) NewFilter

func (Factory) NewFilter(ctx context.Context, config filter.Config) (filter.FrameFilter, error)

type Filter

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

func (*Filter) Close

func (f *Filter) Close() error

func (*Filter) Descriptor

func (f *Filter) Descriptor() filter.Descriptor

func (*Filter) FilterInto

func (f *Filter) FilterInto(ctx context.Context, frame *av.Frame, out *filter.Result) error

func (*Filter) FlushInto

func (f *Filter) FlushInto(ctx context.Context, out *filter.Result) error

FlushInto emits the outputs held back for a right neighbor that will never arrive, holding the final input sample, so the stream's total output count is exactly ceil(inputs*outputRate/inputRate).

func (*Filter) HandleEvent

func (f *Filter) HandleEvent(_ context.Context, event *av.Event) error

HandleEvent restarts the conversion timeline when the input jumps, so a discontinuity never interpolates across unrelated audio.

func (*Filter) Open

func (f *Filter) Open(ctx context.Context, config filter.Config) error

Jump to

Keyboard shortcuts

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