audio

package module
v0.0.0-...-9faf157 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

README

Go Reference Go Report Go Version License Audio Version Support Discord

discord gopher

Audio

The audio module provides opus/pcm/mp3 audio encoding/decoding/resampling as C bindings based on the libopus, libsamplerate and mpg123 libraries. It also lets you combine multiple pcm streams into a single pcm stream. This module requires CGO to be enabled.

Getting Started

Installing
$ go get github.com/disgoorg/audio
Usage

// TODO

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener interface {
	OnPause(player Player)
	OnResume(player Player)
	OnStart(player Player)
	OnEnd(player Player)
	OnError(player Player, err error)
	OnClose(player Player)
}

type Player

type Player interface {
	voice.OpusFrameProvider

	Volume() float32
	SetVolume(volume float32)
	Paused() bool
	SetPaused(paused bool)
}

func NewPlayer

func NewPlayer(providerFunc func() pcm.FrameProvider, listeners ...Listener) (Player, error)

Directories

Path Synopsis
_examples
audio command
player command

Jump to

Keyboard shortcuts

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