audio

package
v1.43.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: GPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceInfo

type DeviceInfo struct {
	Name      string
	IsDefault bool
}

DeviceInfo represents an audio output device

func ListDevices

func ListDevices() ([]DeviceInfo, error)

ListDevices returns all available audio output devices

type Player

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

Player plays audio on a specific device

func NewPlayer

func NewPlayer(deviceName string, volume float64) (*Player, error)

NewPlayer creates a new audio player for the specified device If deviceName is empty, the system default device is used

func (*Player) Close

func (p *Player) Close() error

Close releases resources

func (*Player) Play

func (p *Player) Play(soundPath string) error

Play plays an audio file

Jump to

Keyboard shortcuts

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