discordopus

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 10 Imported by: 0

README

discordopus

Build Status Go Reference Go Report Card

discordopus is a helper library for converting audio streams to discord opus format

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoAudioStream = errors.New("no audio streams found")

Functions

func ConvertS16LEBytesToPCM

func ConvertS16LEBytesToPCM(reader io.Reader) chan PCMData

ConvertS16LEBytesToPCM read from reader, and output to channel; must read chan until emptied, and error check on last returned PCMData

func GetAudioStream

func GetAudioStream(url string) (io.ReadCloser, error)

func LiveConvertAudioStreamToS16LE

func LiveConvertAudioStreamToS16LE(audioStream io.Reader) (io.ReadCloser, error)

Types

type CloseReader

type CloseReader struct {
	io.Reader
	io.Closer
}

type MultiCloser

type MultiCloser []io.Closer

func (*MultiCloser) Close

func (mc *MultiCloser) Close() error

type PCMData

type PCMData struct {
	Error error
	Data  []byte
}

Jump to

Keyboard shortcuts

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