pcm

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package pcm - support raw (verbatim) PCM 16 bit in the FLAC container: - only 1 channel - only 16 bit per sample - only 8000, 16000, 24000, 48000 sample rate

Package pcm https://www.codeproject.com/Articles/14237/Using-the-G711-standard

Package pcm https://www.codeproject.com/Articles/14237/Using-the-G711-standard

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownsampleByte

func DownsampleByte(
	toPCM func(byte) int16, fromPCM func(int16) byte, n float32, handler core.HandlerFunc,
) core.HandlerFunc

func DownsamplePCM

func DownsamplePCM(fromPCM func(int16) byte, n float32, handler core.HandlerFunc) core.HandlerFunc

func FLACEncoder

func FLACEncoder(codec *core.Codec, handler core.HandlerFunc) core.HandlerFunc

func FLACHeader

func FLACHeader(magic bool, sampleRate uint32) []byte

func PCMAtoPCM

func PCMAtoPCM(alaw byte) int16

func PCMUtoPCM

func PCMUtoPCM(ulaw byte) int16

func PCMtoPCMA

func PCMtoPCMA(pcm int16) byte

func PCMtoPCMU

func PCMtoPCMU(pcm int16) byte

func RepackG711 added in v1.6.0

func RepackG711(zeroTS bool, handler core.HandlerFunc) core.HandlerFunc

RepackG711 - Repack G.711 PCMA/PCMU into frames of size 1024

  1. Fixes WebRTC audio quality issue (monotonic timestamp)
  2. Fixes Reolink Doorbell backchannel issue (zero timestamp) https://github.com/AlexxIT/go2rtc/issues/331

func Resample

func Resample(codec *core.Codec, sampleRate uint32, handler core.HandlerFunc) core.HandlerFunc

func ResamplePCM

func ResamplePCM(fromPCM func(int16) byte, handler core.HandlerFunc) core.HandlerFunc

Types

This section is empty.

Directories

Path Synopsis
Package v1 http://web.archive.org/web/20110719132013/http://hazelware.luggle.com/tutorials/mulawcompression.html
Package v1 http://web.archive.org/web/20110719132013/http://hazelware.luggle.com/tutorials/mulawcompression.html

Jump to

Keyboard shortcuts

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