device

package
v0.0.0-...-2889c3b Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDeviceNotSupported is returned when the requested device is not supported
	ErrDeviceNotSupported = errors.New("device not supported")
)
View Source
var (
	// Map is the mapping of device name to device details
	Map = make(map[string]deviceDetails)
)

Functions

func GetKind

func GetKind(d Device) deviceCommon.Kind

GetKind returns the kind for the passed in device

Types

type Device

type Device interface {
	Name() string
	Play(in <-chan *premix.PremixData) error
	PlayWithCtx(ctx context.Context, in <-chan *premix.PremixData) error
	Close() error
}

Device is an interface to output device operations

func CreateOutputDevice

func CreateOutputDevice(settings deviceCommon.Settings) (Device, error)

CreateOutputDevice creates an output device based on the provided settings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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