echo

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package echo turns the audio of a room into a delayed echo stream. Opus cannot be mixed without decoding, so it follows one speaker at a time: whoever talks first holds the echo until they have been silent for the hold time, then the next talker takes over. Output sequence numbers and timestamps are rewritten so the stream stays continuous across switches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delayer

type Delayer struct {
	// contains filtered or unexported fields
}

Delayer is safe for concurrent use: Push is called from one goroutine per source track, Due from the sender loop.

func New

func New(delay time.Duration, minSpeechBytes int, hold time.Duration) *Delayer

func (*Delayer) Due

func (d *Delayer) Due(now time.Time) []*rtp.Packet

Due removes and returns the packets whose delay has passed.

func (*Delayer) Push

func (d *Delayer) Push(src string, p *rtp.Packet, now time.Time)

Push offers one received packet from source src.

Jump to

Keyboard shortcuts

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