Documentation
¶
Overview ¶
Package sio provides support for audio capture and playback.
Package sio is part of http://zikichombo.org
Package sio is in alpha, under development. Playback and capture interfaces are more mature than duplex and device interfaces. Linux/ALSA and darwin have worked on a few test systems. This package intends to be open-ended with respect to platform support, hopefully one day also including drivers from the likes of http://periph.io as upstream providers.
You are welcome to join the discussion and help us meet this goal at http://github.com/zikichombo/sio
Index ¶
- func Capture() (sound.Source, error)
- func CaptureWith(v sound.Form, co sample.Codec, b int) (sound.Source, error)
- func Connect(pkgSel func(string) bool) (host.Entry, error)
- func ConnectTo(name string, pkgSel func(string) bool) (host.Entry, error)
- func Disconnect()
- func Duplex(in, out sound.Form) (sound.Duplex, error)
- func DuplexWith(in, out sound.Form, co sample.Codec, b int) (sound.Duplex, error)
- func EntryNames() []string
- func Play(src sound.Source) error
- func PlayWith(src sound.Source, co sample.Codec, b int) error
- func Player(v sound.Form) (sound.Sink, error)
- func PlayerWith(v sound.Form, co sample.Codec, b int) (sound.Sink, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capture ¶
Capture tries to open the default capture device with default settings with the default host, returning a non-nil in case of failure.
func CaptureWith ¶
CaptureWith opens a sound.Source with the specified sample codec and buffer size.
func Connect ¶
Connect returns a connection to the default host sound system entry point "entry".
Connect returns ErrNoEntryAvailable if there are no entries for the host.
Connect returns ErrEntryInUse if a non-default host entry is in use.
Connect can be called many times without cost of re-initialising a connection. Connect can be called in different goroutines.
The argument pkgSel is used to filter the implementions of an entry point by means of examining their defining package path by reflection. It should return true if it accepts the implementation. If pkgSel is nil, Connect acts as though the function body were "return true".
func ConnectTo ¶
ConnectTo connects to the named host sound system entry point "entry".
ConnectTo returns ErrNoEntryAvailable if there are no entries for the host.
ConnectTo returns ErrEntryInUse if another host entry other than one requested is in use.
ConnectTo can be called many times without cost of re-initialising a connection. ConnectTo can be called in different goroutines.
pkgSel is as in Connect.
func Disconnect ¶
func Disconnect()
Disconnect closes the currently in use entry, if any, so that another one may be used.
func DuplexWith ¶
DuplexWith tries to return a sound.Duplex.
func Play ¶
Play tries to play a sound.Source default settings with the default entry, returning a non-nil in case of failure.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package host provides host sound entry point support.
|
Package host provides host sound entry point support. |
Package libsio provides some support for implementing the different ports.
|
Package libsio provides some support for implementing the different ports. |
ports
|
|
android
Package android zc sound/io entry points.
|
Package android zc sound/io entry points. |
darwin
Package darwin zc sound/io entry points.
|
Package darwin zc sound/io entry points. |
dragonfly
Package dragonfly zc sound/io entry points.
|
Package dragonfly zc sound/io entry points. |
freebsd
Package freebsd zc sound/io entry points.
|
Package freebsd zc sound/io entry points. |
js
Package js zc sound/io entry points.
|
Package js zc sound/io entry points. |
linux
Package linux zc sound/io entry points.
|
Package linux zc sound/io entry points. |
netbsd
Package netbsd zc sound/io entry points.
|
Package netbsd zc sound/io entry points. |
openbsd
Package openbsd zc sound/io entry points.
|
Package openbsd zc sound/io entry points. |
plan9
Package plan9 zc sound/io entry points.
|
Package plan9 zc sound/io entry points. |
solaris
Package solaris zc sound/io entry points.
|
Package solaris zc sound/io entry points. |
windows
Package windows zc sound/io entry points.
|
Package windows zc sound/io entry points. |