sound_effect

package
v0.0.0-...-17244d7 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PlayBackendPulseAudio = iota
	PlayBackendALSA
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ALSAPlayBackend

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

func (*ALSAPlayBackend) Close

func (pb *ALSAPlayBackend) Close() error

func (*ALSAPlayBackend) Drain

func (pb *ALSAPlayBackend) Drain() error

func (*ALSAPlayBackend) Write

func (pb *ALSAPlayBackend) Write(data []byte) error

type CacheItem

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

type Decoder

type Decoder interface {
	GetSampleSpec() *SampleSpec
	Decode() ([]byte, error)
	Close() error
}

type OggDecoder

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

func (*OggDecoder) Close

func (d *OggDecoder) Close() error

func (*OggDecoder) Decode

func (d *OggDecoder) Decode() ([]byte, error)

func (*OggDecoder) GetSampleSpec

func (d *OggDecoder) GetSampleSpec() *SampleSpec

type PlayBackend

type PlayBackend interface {
	Write(data []byte) error
	Drain() error
	Close() error
}

type PlayBackendType

type PlayBackendType uint

type Player

type Player struct {
	UseCache bool
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(useCache bool, backendType PlayBackendType) *Player

func (*Player) Finder

func (player *Player) Finder() *theme.Finder

func (*Player) Play

func (player *Player) Play(theme, event, device string) error

type PulseAudioPlayBackend

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

func (*PulseAudioPlayBackend) Close

func (pb *PulseAudioPlayBackend) Close() error

func (*PulseAudioPlayBackend) Drain

func (pb *PulseAudioPlayBackend) Drain() error

func (*PulseAudioPlayBackend) Write

func (pb *PulseAudioPlayBackend) Write(data []byte) error

type SampleSpec

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

func (*SampleSpec) GetPaSampleSpec

func (ss *SampleSpec) GetPaSampleSpec() *paSimple.SampleSpec

type WavDecoder

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

func (*WavDecoder) Close

func (d *WavDecoder) Close() error

func (*WavDecoder) Decode

func (d *WavDecoder) Decode() ([]byte, error)

func (*WavDecoder) GetSampleSpec

func (d *WavDecoder) GetSampleSpec() *SampleSpec

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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