wiimdev

package
v0.0.0-...-ca95078 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LoopModeNone        LoopMode = 4
	LoopModeOne                  = 1
	LoopModeAll                  = 0
	LoopModeNoneShuffle          = 3
	LoopModeOneShuffle           = 5
	LoopModeAllShuffle           = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	GetInfo() (*DeviceInfo, error)
	Play() error
	Pause() error
	Previous() error
	Next() error
	LoopMode(loopMode LoopMode) error
	Volume(level int) error
	Seek(position time.Duration) error
	Mute(mute bool) error
	GetPlayLists() ([]PlayList, string, error)
	GetTracks(id string) ([]Track, int, error)
	PlayTrack(track int) error
	SetPlayList(id string) error
	GetDeviceDiscovery() *DeviceDiscovery
	SetEqualizer(setting string) error
	GetEqualizer() (string, error)
	GetEqualizerList() ([]string, error)
	GetAudioOutput() (int, error)
	GetAudioOutputList() ([]string, error)
	SetAudioOutput(output int) error
	GetBalance() (float64, error)
	SetBalance(level float64) error
	GetFadeEffects() (bool, error)
	SetFadeEffects(on bool) error
	GetFixedVolume() (bool, error)
	SetFixedVolume(on bool) error
	GetAudioInput() (int, error)
	GetAudioInputList() ([]string, error)
	SetAudioInput(input int) error
}

type DeviceDiscovery

type DeviceDiscovery struct {
	Url         string
	Name        string
	ModelNumber string
	ModelName   string
	Uuid        string
}

func DiscoverWiimDevices

func DiscoverWiimDevices() ([]*DeviceDiscovery, error)

type DeviceInfo

type DeviceInfo struct {
	TransportState TransportState
	Track          int
	TrackTotal     time.Duration
	TrackUsed      time.Duration
	Volume         int
	Mute           bool
	LoopMode       LoopMode
	TrackMetadata  *Metadata
}

type FakeDevice

type FakeDevice struct {
}

func NewFakeDevice

func NewFakeDevice() *FakeDevice

func (*FakeDevice) GetAudioInput

func (device *FakeDevice) GetAudioInput() (int, error)

func (*FakeDevice) GetAudioInputList

func (device *FakeDevice) GetAudioInputList() ([]string, error)

func (*FakeDevice) GetAudioOutput

func (device *FakeDevice) GetAudioOutput() (int, error)

func (*FakeDevice) GetAudioOutputList

func (device *FakeDevice) GetAudioOutputList() ([]string, error)

func (*FakeDevice) GetBalance

func (device *FakeDevice) GetBalance() (float64, error)

func (*FakeDevice) GetDeviceDiscovery

func (device *FakeDevice) GetDeviceDiscovery() *DeviceDiscovery

func (*FakeDevice) GetEqualizer

func (device *FakeDevice) GetEqualizer() (string, error)

func (*FakeDevice) GetEqualizerList

func (device *FakeDevice) GetEqualizerList() ([]string, error)

func (*FakeDevice) GetFadeEffects

func (device *FakeDevice) GetFadeEffects() (bool, error)

func (*FakeDevice) GetFixedVolume

func (device *FakeDevice) GetFixedVolume() (bool, error)

func (*FakeDevice) GetInfo

func (device *FakeDevice) GetInfo() (*DeviceInfo, error)

func (*FakeDevice) GetPlayLists

func (device *FakeDevice) GetPlayLists() ([]PlayList, string, error)

func (*FakeDevice) GetTracks

func (device *FakeDevice) GetTracks(id string) ([]Track, int, error)

func (*FakeDevice) LoopMode

func (device *FakeDevice) LoopMode(loopMode LoopMode) error

func (*FakeDevice) Mute

func (device *FakeDevice) Mute(mute bool) error

func (*FakeDevice) Next

func (device *FakeDevice) Next() error

func (*FakeDevice) Pause

func (device *FakeDevice) Pause() error

func (*FakeDevice) Play

func (device *FakeDevice) Play() error

func (*FakeDevice) PlayTrack

func (device *FakeDevice) PlayTrack(track int) error

func (*FakeDevice) Previous

func (device *FakeDevice) Previous() error

func (*FakeDevice) Seek

func (device *FakeDevice) Seek(position time.Duration) error

func (*FakeDevice) SetAudioInput

func (device *FakeDevice) SetAudioInput(input int) error

func (*FakeDevice) SetAudioOutput

func (device *FakeDevice) SetAudioOutput(output int) error

func (*FakeDevice) SetBalance

func (device *FakeDevice) SetBalance(level float64) error

func (*FakeDevice) SetEqualizer

func (device *FakeDevice) SetEqualizer(setting string) error

func (*FakeDevice) SetFadeEffects

func (device *FakeDevice) SetFadeEffects(on bool) error

func (*FakeDevice) SetFixedVolume

func (device *FakeDevice) SetFixedVolume(on bool) error

func (*FakeDevice) SetPlayList

func (device *FakeDevice) SetPlayList(id string) error

func (*FakeDevice) Volume

func (device *FakeDevice) Volume(level int) error

type LoopMode

type LoopMode uint

type Metadata

type Metadata struct {
	Id       string
	Title    string
	Album    string
	Artist   string
	AlbumArt string
	Rate     int
	Format   string
	Quality  string
	BitRate  int
	Error    error
}

type PlayList

type PlayList struct {
	Id     string
	Name   string
	Source string
}

type Track

type Track struct {
	Id       string
	Source   string
	Metadata *Metadata
}

type TransportState

type TransportState uint
const (
	StateUnknown TransportState = iota
	StateStopped
	StatePaused
	StatePlaying
	StateTransitioning
	StateNoMedia
)

type WiimDevice

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

func NewWiimDevice

func NewWiimDevice(urlString string) (*WiimDevice, error)

func (*WiimDevice) GetAudioInput

func (device *WiimDevice) GetAudioInput() (int, error)

func (*WiimDevice) GetAudioInputList

func (device *WiimDevice) GetAudioInputList() ([]string, error)

func (*WiimDevice) GetAudioOutput

func (device *WiimDevice) GetAudioOutput() (int, error)

func (*WiimDevice) GetAudioOutputList

func (device *WiimDevice) GetAudioOutputList() ([]string, error)

func (*WiimDevice) GetBalance

func (device *WiimDevice) GetBalance() (float64, error)

func (*WiimDevice) GetDeviceDiscovery

func (device *WiimDevice) GetDeviceDiscovery() *DeviceDiscovery

func (*WiimDevice) GetEqualizer

func (device *WiimDevice) GetEqualizer() (string, error)

func (*WiimDevice) GetEqualizerList

func (device *WiimDevice) GetEqualizerList() ([]string, error)

func (*WiimDevice) GetFadeEffects

func (device *WiimDevice) GetFadeEffects() (bool, error)

func (*WiimDevice) GetFixedVolume

func (device *WiimDevice) GetFixedVolume() (bool, error)

func (*WiimDevice) GetInfo

func (device *WiimDevice) GetInfo() (*DeviceInfo, error)

func (*WiimDevice) GetPlayLists

func (device *WiimDevice) GetPlayLists() ([]PlayList, string, error)

func (*WiimDevice) GetTracks

func (device *WiimDevice) GetTracks(id string) ([]Track, int, error)

func (*WiimDevice) LoopMode

func (device *WiimDevice) LoopMode(loopMode LoopMode) error

func (*WiimDevice) Mute

func (device *WiimDevice) Mute(mute bool) error

func (*WiimDevice) Next

func (device *WiimDevice) Next() error

func (*WiimDevice) Pause

func (device *WiimDevice) Pause() error

func (*WiimDevice) Play

func (device *WiimDevice) Play() error

func (*WiimDevice) PlayTrack

func (device *WiimDevice) PlayTrack(track int) error

func (*WiimDevice) Previous

func (device *WiimDevice) Previous() error

func (*WiimDevice) Seek

func (device *WiimDevice) Seek(position time.Duration) error

func (*WiimDevice) SetAudioInput

func (device *WiimDevice) SetAudioInput(input int) error

func (*WiimDevice) SetAudioOutput

func (device *WiimDevice) SetAudioOutput(output int) error

func (*WiimDevice) SetBalance

func (device *WiimDevice) SetBalance(level float64) error

func (*WiimDevice) SetEqualizer

func (device *WiimDevice) SetEqualizer(setting string) error

func (*WiimDevice) SetFadeEffects

func (device *WiimDevice) SetFadeEffects(on bool) error

func (*WiimDevice) SetFixedVolume

func (device *WiimDevice) SetFixedVolume(on bool) error

func (*WiimDevice) SetPlayList

func (device *WiimDevice) SetPlayList(id string) error

func (*WiimDevice) Volume

func (device *WiimDevice) Volume(level int) error

Jump to

Keyboard shortcuts

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