speakers

package
v0.0.0-...-da4d551 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nil       = "nil"
	Beep      = "beep"
	PortAudio = "portaudio"
	Oto       = "oto"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioLib

type AudioLib string

type AudioSpeaker

type AudioSpeaker interface {
	Init()
	Reset()
	Stop()
	Play()
	Sample(float64) bool
	SampleRate() int
	BufferReady() bool
}

func NewSpeaker

func NewSpeaker(lib AudioLib) AudioSpeaker

type CircularBuffer

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

func NewCircularBuffer

func NewCircularBuffer(size int) *CircularBuffer

func (*CircularBuffer) Available

func (c *CircularBuffer) Available() int

func (*CircularBuffer) Read

func (c *CircularBuffer) Read() (float64, error)

func (*CircularBuffer) ReadInto

func (c *CircularBuffer) ReadInto(slice []float32) int

func (*CircularBuffer) ReadInto2

func (c *CircularBuffer) ReadInto2(slice [][2]float64) int

func (*CircularBuffer) Write

func (c *CircularBuffer) Write(value float64, wait bool) error

type SpeakerBeep

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

func (*SpeakerBeep) BufferReady

func (s *SpeakerBeep) BufferReady() bool

func (*SpeakerBeep) Init

func (s *SpeakerBeep) Init()

func (*SpeakerBeep) Play

func (s *SpeakerBeep) Play()

func (*SpeakerBeep) Reset

func (s *SpeakerBeep) Reset()

func (*SpeakerBeep) Sample

func (s *SpeakerBeep) Sample(sample float64) bool

func (*SpeakerBeep) SampleRate

func (s *SpeakerBeep) SampleRate() int

func (*SpeakerBeep) Stop

func (s *SpeakerBeep) Stop()

type SpeakerNil

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

func (*SpeakerNil) BufferReady

func (s *SpeakerNil) BufferReady() bool

func (*SpeakerNil) Init

func (s *SpeakerNil) Init()

func (*SpeakerNil) Play

func (s *SpeakerNil) Play()

func (*SpeakerNil) Reset

func (s *SpeakerNil) Reset()

func (*SpeakerNil) Sample

func (s *SpeakerNil) Sample(float64) bool

func (*SpeakerNil) SampleRate

func (s *SpeakerNil) SampleRate() int

func (*SpeakerNil) Stop

func (s *SpeakerNil) Stop()

type SpeakerOto

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

func (*SpeakerOto) BufferReady

func (s *SpeakerOto) BufferReady() bool

func (*SpeakerOto) Init

func (s *SpeakerOto) Init()

func (*SpeakerOto) Play

func (s *SpeakerOto) Play()

func (*SpeakerOto) Reset

func (s *SpeakerOto) Reset()

func (*SpeakerOto) Sample

func (s *SpeakerOto) Sample(sample float64) bool

func (*SpeakerOto) SampleRate

func (s *SpeakerOto) SampleRate() int

func (*SpeakerOto) Stop

func (s *SpeakerOto) Stop()

type SpeakerPort

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

func (*SpeakerPort) BufferReady

func (s *SpeakerPort) BufferReady() bool

func (*SpeakerPort) Init

func (s *SpeakerPort) Init()

func (*SpeakerPort) Play

func (s *SpeakerPort) Play()

func (*SpeakerPort) Reset

func (s *SpeakerPort) Reset()

func (*SpeakerPort) Sample

func (s *SpeakerPort) Sample(sample float64) bool

func (*SpeakerPort) SampleRate

func (s *SpeakerPort) SampleRate() int

func (*SpeakerPort) Stop

func (s *SpeakerPort) Stop()

Jump to

Keyboard shortcuts

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