sample

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: MIT Imports: 3 Imported by: 21

Documentation

Overview

Package sample models an audio sample

Package sample models an audio sample

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureOutput

func ConfigureOutput(s spec.AudioSpec)

func OutNextBytes

func OutNextBytes() (out []byte)

OutNextBytes to mix the next sample for all channels, in bytes

func SetOutputCallback

func SetOutputCallback(fn OutNextCallbackFunc)

SetOutNextCallback to set streaming callback function

Types

type OutNextCallbackFunc

type OutNextCallbackFunc func() []Value

OutNextCallbackFunc to stream mix out from mix

type Sample

type Sample struct {
	Values []Value
}

func New

func New(values []Value) Sample

type Value

type Value float64

func OutNext

func OutNext() []Value

OutNext to mix the next sample for all channels, in []float64

func ValueOfByteS8

func ValueOfByteS8(sample byte) Value

func ValueOfByteU8

func ValueOfByteU8(sample byte) Value

func ValueOfBytesF32LSB

func ValueOfBytesF32LSB(sample []byte) Value

func ValueOfBytesF64LSB

func ValueOfBytesF64LSB(sample []byte) Value

func ValueOfBytesS16LSB

func ValueOfBytesS16LSB(sample []byte) Value

func ValueOfBytesS32LSB

func ValueOfBytesS32LSB(sample []byte) Value

func ValueOfBytesU16LSB

func ValueOfBytesU16LSB(sample []byte) Value

func (Value) Abs

func (this Value) Abs() Value

func (Value) ToByteS8

func (this Value) ToByteS8() byte

func (Value) ToByteU8

func (this Value) ToByteU8() byte

func (Value) ToBytesF32LSB

func (this Value) ToBytesF32LSB() (out []byte)

func (Value) ToBytesF64LSB

func (this Value) ToBytesF64LSB() (out []byte)

func (Value) ToBytesS16LSB

func (this Value) ToBytesS16LSB() (out []byte)

func (Value) ToBytesS32LSB

func (this Value) ToBytesS32LSB() (out []byte)

func (Value) ToBytesU16LSB

func (this Value) ToBytesU16LSB() (out []byte)

func (Value) ToInt16

func (this Value) ToInt16() int16

func (Value) ToInt32

func (this Value) ToInt32() int32

func (Value) ToInt8

func (this Value) ToInt8() int8

func (Value) ToUint16

func (this Value) ToUint16() uint16

func (Value) ToUint8

func (this Value) ToUint8() uint8

Jump to

Keyboard shortcuts

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