g711

package module
v0.0.0-...-92d6a38 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 3 Imported by: 0

README

go-g711

Golang package g711 implements the ITU-T standard for audio companding

Documentation

Overview

Package g711 implements the ITU-T G.711 standard for audio companding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ALawDecode

func ALawDecode(in []uint8) []int16

ALawDecode decodes a slice of a-law samples to PCM16.

func ALawDecodeSample

func ALawDecodeSample(s uint8) int16

ALawDecodeSample decodes an a-law sample to PCM16.

func ALawEncode

func ALawEncode(in []int16) []uint8

ALawEncode encodes a slice of PCM16 samples to a-law.

func ALawEncodeSample

func ALawEncodeSample(s int16) uint8

ALawEncodeSample encodes a PCM16 sample to a-law.

func MLawDecode

func MLawDecode(in []uint8) []int16

MLawDecode decodes a slice of μ-law samples to PCM16.

func MLawDecodeSample

func MLawDecodeSample(s uint8) int16

MLawDecodeSample decodes an μ-law sample to PCM16.

func MLawEncode

func MLawEncode(in []int16) []uint8

MLawEncode encodes a slice of PCM16 samples to μ-law.

func MLawEncodeSample

func MLawEncodeSample(s int16) uint8

MLawEncodeSample encodes a PCM16 sample to μ-law.

Types

type ALawDecoder

type ALawDecoder struct {
	io.Reader
	binary.ByteOrder
	// contains filtered or unexported fields
}

func NewALawDecoder

func NewALawDecoder(r io.Reader) (*ALawDecoder, error)

NewALawDecoder builds an io.Writer that consumes an io.Reader.

func (*ALawDecoder) Read

func (e *ALawDecoder) Read(p []byte) (n int, err error)

type ALawEncoder

type ALawEncoder struct {
	io.Reader
	// contains filtered or unexported fields
}

func NewALawEncoder

func NewALawEncoder(r io.Reader) (*ALawEncoder, error)

NewALawEncoder builds an io.Writer that consumes an io.Reader.

func (*ALawEncoder) Read

func (e *ALawEncoder) Read(p []byte) (n int, err error)

Directories

Path Synopsis
cmd
g711js command
g711js generates a Javascript G.711 decoder.
g711js generates a Javascript G.711 decoder.

Jump to

Keyboard shortcuts

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