detritus

AudioMixerclass

Mixes multiple PCM sources (e.g. each user's decoded voice) into one continuous stream Packets are placed using their RTP timestamps, so jitter and bursts don't smear the audio Emits data with one mixed PCM frame (of format.frameDuration) at a steady rate while running Only signed 16-bit little-endian interleaved PCM is supported (what opus decoders output)

On this page

Mixes multiple PCM sources (e.g. each user's decoded voice) into one continuous stream Packets are placed using their RTP timestamps, so jitter and bursts don't smear the audio Emits data with one mixed PCM frame (of format.frameDuration) at a steady rate while running Only signed 16-bit little-endian interleaved PCM is supported (what opus decoders output)

import { AudioMixer } from 'detritus-client';
AudioMixerAudioMixer

Constructor

Methods

attach()

src/media/audiomixer.ts:37
attach(connection: VoiceConnection): () => void

Listens to a voice connection's decoded audio and mixes in every user that isMixing() allows Returns a function that detaches the listeners