function packet_audio_encode
packet_audio_encode(
audio_pcm,
lane_name,
ext_bytes?: Uint8Array,
silent_threshold_dbfs?,
)

Create audio packet

Parameters

audio_pcm

Audio PCM

lane_name

Lane name of view in mixer-client

optional
ext_bytes: Uint8Array

User's custom external data

optional
silent_threshold_dbfs

Under this dBFS input will be ignored

Return Type

Throws

TypeError

If audio_pcm is not Float32Array

TypeError

If lane_name is not string

TypeError

If ext_bytes is not Uint8Array

TypeError

If silent_threshold_dbfs is not number

RangeError

If lane_name is empty string

RangeError

If lane_name has non ascii or control ascii characters

RangeError

If lane_name has over 3 characters

RangeError

If ext_bytes has over 255 bytes

RangeError

If silent_threshold_dbfs is positive value

Usage

import { packet_audio_encode } from "static/packet_conv/audio.js";