Documentation ¶
Overview ¶
Package audioinput defines an audio capturing device.
Index ¶
- Constants
- Variables
- func DependencyTypeError(name, actual interface{}) error
- func Named(name string) resource.Name
- func NamesFromRobot(r robot.Robot) []string
- func NewServer(s subtype.Service) pb.AudioInputServiceServer
- func NewUnimplementedInterfaceError(actual interface{}) error
- func WrapWithReconfigurable(r interface{}, name resource.Name) (resource.Reconfigurable, error)
- type AudioInput
- func FromDependencies(deps registry.Dependencies, name string) (AudioInput, error)
- func FromRobot(r robot.Robot, name string) (AudioInput, error)
- func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) AudioInput
- func NewFromReader(reader gostream.AudioReader, props prop.Audio) (AudioInput, error)
- func NewFromSource(audSrc gostream.AudioSource) (AudioInput, error)
Constants ¶
const SubtypeName = resource.SubtypeName("audio_input")
SubtypeName is a constant that identifies the audio input resource subtype string.
Variables ¶
var HostEndian binary.ByteOrder
HostEndian indicates the byte ordering this host natively uses.
var Subtype = resource.NewSubtype( resource.ResourceNamespaceRDK, resource.ResourceTypeComponent, SubtypeName, )
Subtype is a constant that identifies the audio input resource subtype.
Functions ¶
func DependencyTypeError ¶
func DependencyTypeError(name, actual interface{}) error
DependencyTypeError is used when a resource doesn't implement the expected interface.
func NamesFromRobot ¶
NamesFromRobot is a helper for getting all audio input names from the given Robot.
func NewServer ¶
func NewServer(s subtype.Service) pb.AudioInputServiceServer
NewServer constructs an audio input gRPC service server.
func NewUnimplementedInterfaceError ¶
func NewUnimplementedInterfaceError(actual interface{}) error
NewUnimplementedInterfaceError is used when there is a failed interface check.
func WrapWithReconfigurable ¶
func WrapWithReconfigurable(r interface{}, name resource.Name) (resource.Reconfigurable, error)
WrapWithReconfigurable wraps an audio input with a reconfigurable and locking interface.
Types ¶
type AudioInput ¶
type AudioInput interface { gostream.AudioSource gostream.AudioPropertyProvider generic.Generic }
An AudioInput represents anything that can capture audio.
func FromDependencies ¶
func FromDependencies(deps registry.Dependencies, name string) (AudioInput, error)
FromDependencies is a helper for getting the named audio input from a collection of dependencies.
func FromRobot ¶
func FromRobot(r robot.Robot, name string) (AudioInput, error)
FromRobot is a helper for getting the named audio input from the given Robot.
func NewClientFromConn ¶
func NewClientFromConn(ctx context.Context, conn rpc.ClientConn, name string, logger golog.Logger) AudioInput
NewClientFromConn constructs a new Client from connection passed in.
func NewFromReader ¶
func NewFromReader(reader gostream.AudioReader, props prop.Audio) (AudioInput, error)
NewFromReader creates an AudioInput from a reader.
func NewFromSource ¶
func NewFromSource(audSrc gostream.AudioSource) (AudioInput, error)
NewFromSource creates an AudioInput from an AudioSource.
Directories ¶
Path | Synopsis |
---|---|
Package fake implements a fake audio input.
|
Package fake implements a fake audio input. |
Package microphone implements a microphone audio input.
|
Package microphone implements a microphone audio input. |
Package register registers all relevant audio inputs and also subtype specific functions
|
Package register registers all relevant audio inputs and also subtype specific functions |