sdlaudio

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: GPL-3.0 Imports: 8 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {
	Prefs *Preferences
	// 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 protocol.AudioMixer interface.

func (*Audio) MoreAudio added in v0.15.0

func (aud *Audio) MoreAudio() bool

SetAudio implements the protocol.RealtimeAudioMixer 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 protocol.AudioMixer interface.

func (*Audio) SetAudio

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

SetAudio implements the protocol.AudioMixer 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