9a78b3e3f1
Release / build (amd64, darwin, macos-latest) (push) Has been cancelled
Release / build (amd64, linux, ubuntu-latest) (push) Has been cancelled
Release / build (amd64, windows, windows-latest) (push) Has been cancelled
Release / build (arm64, darwin, macos-latest) (push) Has been cancelled
Release / build (arm64, linux, ubuntu-latest) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / update-homebrew (push) Has been cancelled
* feat: support media controller on mac * fix(notifications): publish current playback state when media notifier attaches * fix(darwin): lock startup to the Cocoa main thread * refactor: cleanup and simplify * missed cleanup
21 lines
687 B
Go
21 lines
687 B
Go
// player/audio_device_stub.go — fallback for platforms without device selection support.
|
|
|
|
//go:build !linux && (!darwin || ios || !cgo) && !windows
|
|
|
|
package player
|
|
|
|
import "fmt"
|
|
|
|
// ListAudioDevices is not available on this platform.
|
|
func ListAudioDevices() ([]AudioDevice, error) {
|
|
return nil, fmt.Errorf("audio device selection is not available on this platform")
|
|
}
|
|
|
|
// PrepareAudioDevice is a no-op on unsupported platforms.
|
|
func PrepareAudioDevice(device string) func() { return func() {} }
|
|
|
|
// SwitchAudioDevice is not supported on this platform.
|
|
func SwitchAudioDevice(deviceName string) error {
|
|
return fmt.Errorf("audio device switching is not available on this platform")
|
|
}
|