sdlaudio

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package sdlaudio provides the Audio type. The Audio type implements the AudioMixer interface using SDL and is suitable for use with any SDL presenation.

Index

Constants

View Source
const (
	QueueOkay    = 2000
	QueueWarning = 8000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {

	// audio preferences
	Prefs *Preferences

	QueuedBytes atomic.Int32
	// contains filtered or unexported fields
}

Audio outputs sound using SDL.

func NewAudio

func NewAudio() (*Audio, error)

NewAudio is the preferred method of initialisation for the Audio Type.

func (*Audio) EndMixing

func (aud *Audio) EndMixing() error

EndMixing implements the television.AudioMixer interface.

func (*Audio) Mute added in v0.10.1

func (aud *Audio) Mute(muted bool)

Mute silences the audio device.

func (*Audio) Reset added in v0.8.0

func (aud *Audio) Reset()

Reset implements the television.AudioMixer interface.

func (*Audio) SetAudio

func (aud *Audio) SetAudio(sig []signal.AudioSignalAttributes) error

SetAudio implements the television.AudioMixer interface.

func (*Audio) SetSpec added in v0.40.0

func (aud *Audio) SetSpec(spec specification.Spec)

SetSpec implements the television.RealtimeAudioMixer interface.

type Preferences added in v0.14.0

type Preferences struct {
	Stereo     prefs.Bool
	Discrete   prefs.Bool
	Separation prefs.Int
	// contains filtered or unexported fields
}

func NewPreferences added in v0.14.0

func NewPreferences() (*Preferences, error)

NewPreferences is the preferred method of initialisation for the Preferences type.

func (*Preferences) Load added in v0.14.0

func (p *Preferences) Load() error

Load disassembly preferences and apply to the current disassembly.

func (*Preferences) Save added in v0.14.0

func (p *Preferences) Save() error

Save current disassembly preferences to disk.

func (*Preferences) SetDefaults added in v0.14.0

func (p *Preferences) SetDefaults()

SetDefaults reverts all audio settings to default values.

func (*Preferences) String added in v0.14.0

func (p *Preferences) String() string

Jump to

Keyboard shortcuts

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