pcmtoopus

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 2 Imported by: 0

README

xk6-pcm-to-opus

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpusEncoder

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

OpusEncoder structure to hold the Opus encoder for each VU.

func (*OpusEncoder) Close

func (oe *OpusEncoder) Close()

Close the Opus encoder.

func (*OpusEncoder) Encode

func (oe *OpusEncoder) Encode(audioChunk []float32) ([]byte, error)

Encode encodes a chunk of PCM float32 data to Opus using EncodeFloat32.

type PCMToOpus

type PCMToOpus struct{}

PCMToOpus type will expose the methods for the plugin.

func (*PCMToOpus) NewEncoder

func (p *PCMToOpus) NewEncoder(sampleRate int, channels int, application opus.Application) (*OpusEncoder, error)

NewEncoder initializes a new Opus encoder.

type RootModule

type RootModule struct{}

RootModule is the module's root type.

func (*RootModule) New

func (r *RootModule) New() interface{}

New creates a new instance of the module, exposing its functionality to the JS runtime.

Jump to

Keyboard shortcuts

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