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 ¶
- func SwresampleConfiguration() string
- func SwresampleLicense() string
- func SwresampleVersion() uint
- type AvSampleFormat
- type Class
- type Context
- func (s *Context) SwrAllocSetOpts(ocl int64, osf AvSampleFormat, osr int, icl int64, isf AvSampleFormat, ...) *Context
- func (s *Context) SwrClose()
- func (s *Context) SwrConfigFrame(o, i *Frame) int
- func (s *Context) SwrConvert(out **uint8, oc int, in **uint8, ic int) int
- func (s *Context) SwrConvertFrame(o, i *Frame) int
- func (s *Context) SwrDropOutput(c int) int
- func (s *Context) SwrFree()
- func (s *Context) SwrGetDelay(b int64) int64
- func (s *Context) SwrInit() int
- func (s *Context) SwrInjectSilence(c int) int
- func (s *Context) SwrIsInitialized() int
- func (s *Context) SwrNextPts(pts int64) int64
- func (s *Context) SwrSetChannelMapping(cm *int) int
- func (s *Context) SwrSetCompensation(sd, cd int) int
- func (s *Context) SwrSetMatrix(m *int, t int) int
- type Frame
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SwresampleConfiguration ¶
func SwresampleConfiguration() string
func SwresampleLicense ¶
func SwresampleLicense() string
Types ¶
type AvSampleFormat ¶
type AvSampleFormat C.enum_AVSampleFormat
type Class ¶
type Class C.struct_AVClass
type Context ¶
type Context C.struct_SwrContext
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 ¶
Configure or reconfigure the Context using the information provided by the AvFrames.
func (*Context) SwrConvert ¶
Core conversion functions. Convert audio
func (*Context) SwrConvertFrame ¶
Frame based API. Convert the samples in the input Frame and write them to the output Frame.
func (*Context) SwrDropOutput ¶
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 ¶
Gets the delay the next input sample will experience relative to the next output sample.
func (*Context) SwrInjectSilence ¶
Injects the specified number of silence samples.
func (*Context) SwrIsInitialized ¶
Check whether an swr context has been initialized or not.
func (*Context) SwrNextPts ¶
Convert the next timestamp from input to output timestamps are in 1/(in_sample_rate * out_sample_rate) units.
func (*Context) SwrSetChannelMapping ¶
Set a customized input channel mapping.
func (*Context) SwrSetCompensation ¶
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).
type Frame ¶
type Frame C.struct_AVFrame