swresample

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: MIT Imports: 2 Imported by: 13

Documentation

Overview

Package swresample provides a high-level interface to the libswresample library audio resampling utilities The process of changing the sampling rate of a discrete signal to obtain a new discrete representation of the underlying continuous signal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SwresampleConfiguration

func SwresampleConfiguration() string

func SwresampleLicense

func SwresampleLicense() string

func SwresampleVersion

func SwresampleVersion() uint

Configuration accessors

Types

type AvSampleFormat

type AvSampleFormat C.enum_AVSampleFormat

type Class

type Class C.struct_AVClass

func SwrGetClass

func SwrGetClass() *Class

Get the Class for Context.

type Context

type Context C.struct_SwrContext

func SwrAlloc

func SwrAlloc() *Context

Context constructor functions.Allocate Context.

func (*Context) SwrAllocSetOpts

func (s *Context) SwrAllocSetOpts(ocl int64, osf AvSampleFormat, osr int, icl int64, isf AvSampleFormat, isr, lo, lc int) *Context

Allocate Context if needed and set/reset common parameters.

func (*Context) SwrClose

func (s *Context) SwrClose()

Closes the context so that swr_is_initialized() returns 0.

func (*Context) SwrConfigFrame

func (s *Context) SwrConfigFrame(o, i *Frame) int

Configure or reconfigure the Context using the information provided by the AvFrames.

func (*Context) SwrConvert

func (s *Context) SwrConvert(out **uint8, oc int, in **uint8, ic int) int

Core conversion functions. Convert audio

func (*Context) SwrConvertFrame

func (s *Context) SwrConvertFrame(o, i *Frame) int

Frame based API. Convert the samples in the input Frame and write them to the output Frame.

func (*Context) SwrDropOutput

func (s *Context) SwrDropOutput(c int) int

Sample handling functions. Drops the specified number of output samples.

func (*Context) SwrFree

func (s *Context) SwrFree()

Context destructor functions. Free the given Context and set the pointer to NULL.

func (*Context) SwrGetDelay

func (s *Context) SwrGetDelay(b int64) int64

Gets the delay the next input sample will experience relative to the next output sample.

func (*Context) SwrInit

func (s *Context) SwrInit() int

Initialize context after user parameters have been set.

func (*Context) SwrInjectSilence

func (s *Context) SwrInjectSilence(c int) int

Injects the specified number of silence samples.

func (*Context) SwrIsInitialized

func (s *Context) SwrIsInitialized() int

Check whether an swr context has been initialized or not.

func (*Context) SwrNextPts

func (s *Context) SwrNextPts(pts int64) int64

Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units.

func (*Context) SwrSetChannelMapping

func (s *Context) SwrSetChannelMapping(cm *int) int

Set a customized input channel mapping.

func (*Context) SwrSetCompensation

func (s *Context) SwrSetCompensation(sd, cd int) int

Low-level option setting functions These functons provide a means to set low-level options that is not possible with the AvOption API. Activate resampling compensation ("soft" compensation).

func (*Context) SwrSetMatrix

func (s *Context) SwrSetMatrix(m *int, t int) int

Set a customized remix matrix.

type Frame

type Frame C.struct_AVFrame

Jump to

Keyboard shortcuts

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