audio

package
v0.0.0-...-4e400ea Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClockRate = 48 // KHz
	FrameTime = 20 // ms
	Channels  = 2  // Stereo

	Samples = ClockRate * FrameTime
)
View Source
const (
	TransmitRepeat = 5 * time.Second
	TransmitExpire = 100 * time.Millisecond
)

Variables

This section is empty.

Functions

This section is empty.

Types

type In

type In struct {
	In           chan []int16
	Active       time.Time
	Notify       time.Time
	Transmitting bool
	*sync.Mutex
}

func NewIn

func NewIn() *In

func (*In) ExpireTransmit

func (in *In) ExpireTransmit() bool

func (*In) StartTransmit

func (in *In) StartTransmit() bool

type Out

type Out struct {
	Out    []chan *rtp.Packet
	Tracks []*webrtc.TrackLocalStaticSample
	Client []int
	Active []time.Time
	*sync.Mutex
}

func NewOut

func NewOut() *Out

func (*Out) AddTrack

func (o *Out) AddTrack(track *webrtc.TrackLocalStaticSample)

func (*Out) Reset

func (o *Out) Reset()

func (*Out) Write

func (o *Out) Write(p *rtp.Packet, source int)

Jump to

Keyboard shortcuts

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