snapcast

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MuteDevicePrefix = "snapcast_audio_mute"
View Source
const VolumeDevicePrefix = "snapcast_audio_volume"

Variables

This section is empty.

Functions

func New

func New() bus.Bus

Types

type SnapcastBus

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

func (*SnapcastBus) Deinitialize

func (b *SnapcastBus) Deinitialize()

Deinitialize is used when actuator is going off

func (*SnapcastBus) Device

func (b *SnapcastBus) Device(id string) (bus.Device, error)

Given an unique id returns the corresponding device, an error if the id does not correspond to a device

func (*SnapcastBus) DeviceChanges

func (b *SnapcastBus) DeviceChanges() <-chan string

Channel that returns the id of a device in the moment the device changes his status

func (*SnapcastBus) DeviceIds

func (b *SnapcastBus) DeviceIds() []string

list of device ids this bus is handling

func (*SnapcastBus) GetClientVolume

func (b *SnapcastBus) GetClientVolume(clientID string) (snapcast.Volume, error)

func (*SnapcastBus) GetServerStatus

func (b *SnapcastBus) GetServerStatus() (status *snapcast.ServerStatus, err error)

func (*SnapcastBus) Initialize

func (b *SnapcastBus) Initialize(config interface{})

func (*SnapcastBus) SetClientVolume

func (b *SnapcastBus) SetClientVolume(clientID string, volume *snapcast.Volume) error

func (*SnapcastBus) String

func (b *SnapcastBus) String() string

type SnapcastConfig

type SnapcastConfig struct {
	SnapcastServerAddress string `json:"server_address" mapstructure:"server_address"`
}

type SnapcastDevice

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

type SnapcastMuteDevice

type SnapcastMuteDevice SnapcastDevice

func (*SnapcastMuteDevice) Description

func (d *SnapcastMuteDevice) Description() bus.DeviceDescription

func (*SnapcastMuteDevice) ID

func (d *SnapcastMuteDevice) ID() string

func (*SnapcastMuteDevice) Kind

func (d *SnapcastMuteDevice) Kind() bus.DeviceKind

func (*SnapcastMuteDevice) Toggle

func (d *SnapcastMuteDevice) Toggle()

func (*SnapcastMuteDevice) TurnOff

func (d *SnapcastMuteDevice) TurnOff()

func (*SnapcastMuteDevice) TurnOn

func (d *SnapcastMuteDevice) TurnOn()

type SnapcastVolumeDevice

type SnapcastVolumeDevice SnapcastDevice

func (*SnapcastVolumeDevice) AddValue

func (d *SnapcastVolumeDevice) AddValue(value float64)

func (*SnapcastVolumeDevice) Description

func (d *SnapcastVolumeDevice) Description() bus.DeviceDescription

func (*SnapcastVolumeDevice) ID

func (d *SnapcastVolumeDevice) ID() string

func (*SnapcastVolumeDevice) Kind

func (*SnapcastVolumeDevice) SetValue

func (d *SnapcastVolumeDevice) SetValue(value float64)

Jump to

Keyboard shortcuts

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