oto

package
v0.0.0-...-646ff60 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleRate = 48000
	Channels   = 2
	BufferSize = 100 * time.Millisecond
	Format     = types.PCMFormatFloat32LE
)
View Source
const (
	Priority = 100
)

Variables

This section is empty.

Functions

func FormatToOto

func FormatToOto(f types.PCMFormat) oto.Format

Types

type PlayerPCM

type PlayerPCM struct {
}

func NewPlayerPCM

func NewPlayerPCM() PlayerPCM

func (PlayerPCM) Ping

func (PlayerPCM) Ping() error

func (PlayerPCM) PlayPCM

func (PlayerPCM) PlayPCM(
	sampleRate uint32,
	channels uint16,
	format types.PCMFormat,
	bufferSize time.Duration,
	reader io.Reader,
) (types.Stream, error)

type PlayerPCMOtoFactory

type PlayerPCMOtoFactory struct{}

func (PlayerPCMOtoFactory) NewPlayerPCM

func (PlayerPCMOtoFactory) NewPlayerPCM() types.PlayerPCM

type Stream

type Stream struct {
	*oto.Player
}

func (*Stream) Close

func (stream *Stream) Close() error

func (*Stream) Drain

func (stream *Stream) Drain() error

Jump to

Keyboard shortcuts

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