oto

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FloatBufferTo16BitLE

func FloatBufferTo16BitLE(from sointu.AudioBuffer, to []byte) []byte

FloatBufferTo16BitLE is a naive helper method to convert []float32 buffers to 16-bit little-endian, but encoded in byte buffer

Appends the encoded bytes into "to" slice, allowing you to preallocate the capacity or just use nil

Types

type OtoContext

type OtoContext oto.Context

func NewContext

func NewContext() (*OtoContext, error)

NewPlayer creates and initializes a new OtoPlayer

func (*OtoContext) Close

func (c *OtoContext) Close() error

func (*OtoContext) Output

func (c *OtoContext) Output() sointu.AudioOutput

type OtoOutput

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

func (*OtoOutput) Close

func (o *OtoOutput) Close() error

Close disposes of resources

func (*OtoOutput) WriteAudio

func (o *OtoOutput) WriteAudio(floatBuffer sointu.AudioBuffer) (err error)

Play implements the audio.Player interface for OtoPlayer

Jump to

Keyboard shortcuts

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