Documentation ¶
Overview ¶
Package audio is based on aplay audio adaptor written by @colemanserious (https://github.com/colemanserious)
Package audio is based on aplay audio adaptor written by @colemanserious (https://github.com/colemanserious)
Package audio provides the Gobot adaptor for audio.
For more information refer to the README: https://github.com/hybridgroup/gobot/blob/master/platforms/audio/README.md
Index ¶
- func CommandName(fileName string) (commandName string, err error)
- func RunCommand(audioCommand string, filename string) error
- type Adaptor
- type Driver
- func (d *Driver) Connection() gobot.Connection
- func (d *Driver) Filename() string
- func (d *Driver) Halt() (err error)
- func (d *Driver) Name() string
- func (d *Driver) Play() []error
- func (d *Driver) SetName(n string)
- func (d *Driver) Sound(fileName string) []error
- func (d *Driver) Start() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandName ¶
CommandName defines the playback command for a sound and accepts:
string: The filename of the audio that needs playback
func RunCommand ¶
RunCommand executes the playback command for a sound file and accepts:
string: The audio command to be use for playback string: The filename of the audio that needs playback
Types ¶
type Adaptor ¶
type Adaptor struct {
// contains filtered or unexported fields
}
Adaptor is gobot Adaptor connection to audio playback
type Driver ¶
Driver is gobot software device for audio playback
func NewDriver ¶
NewDriver returns a new audio Driver. It accepts:
*Adaptor: The audio adaptor to use for the driver
string: The filename of the audio to start playing
func (*Driver) Connection ¶
func (d *Driver) Connection() gobot.Connection
Connection returns the Driver Connection