sio

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

README

ZikiChombo sio project

Build Status

Usage

If you are using sio for sound capture and playback, only the sio package is needed. For device scanning and APIs, the host package provides the necessary support.

Ports

For porting, see the porting guide and contributing.

Status

Below is the status of sio ports. Items marked with an "X" in plain text (checked off in html rendered markdown) are incorporated into sio, potentially with alpha status. Items marked with a "?" indicates we do not yet have sufficient knowledge to judge whether or not the item is a TODO. Related discussion on the issue tracker is welcome. Items marked with "-" are those for which we think the functionality is not relevant or not sufficiently supported by the external software interface to add to sio.

In the event there are opinions about the content of the list itself, such as whether to support JACK, whether to interface with Android HAL, the issue tracker is our best means of coordinating the discussion.

  • Linux

    1. ALSA (cgo)
      1. Playback
      2. Capture
      3. Duplex
      4. Device Scanning
      5. Device Notification
    2. TinyALSA (cgo)
      1. Playback
      2. Capture
      3. Duplex
      4. [?] Device Scanning
      5. [?] Device Notification
    3. ALSA (no cgo)
      1. [?] Playback
      2. [?] Capture
      3. [?] Duplex
      4. [?] Device Scanning
      5. [?] Device Notification
    4. Pulse Audio
      1. Playback
      2. Capture
      3. [?] Duplex
      4. [?] Device Scanning
      5. [?] Device Notification
  • Darwin/iOS

    1. Audio Queue Services
      1. Playback
      2. Capture
      3. [-] Duplex
      4. [-] Device Scanning
      5. Test for iOS
    2. AUHAL
      1. Playback
      2. Capture
      3. Duplex
      4. Device Scanning
      5. Test for iOS via RemoteIO replacing AUHAL.
    3. VPIO [?]
  • Android

    1. Android Audio HAL
      1. Playback
      2. Capture
      3. [?] Duplex
      4. [-] Device Scanning
      5. [-] Device Notification
    2. AAudio
      1. Playback
      2. Capture
      3. [?] Duplex
      4. [-] Device Scanning
      5. [-] Device Notification
    3. OpenSL ES
      1. Playback
      2. Capture
      3. [?] Duplex
      4. [-] Device Scanning
      5. [-] Device Notification
    4. AudioManager (nb to be used for device scanning in combination with above)
      1. [-] Playback
      2. [-] Capture
      3. [-] Duplex
      4. Device Scanning
      5. [-] Device Notification
  • Windows

    1. Direct Sound
      1. [?] Playback
      2. [?] Capture
      3. [?] Duplex
      4. [?] Device Scanning
      5. [?] Device Notification
    2. WASAPI
      1. [?] Playback
      2. [?] Capture
      3. [?] Duplex
      4. [?] Device Scanning
      5. [?] Device Notification
  • js

    1. Web Audio
      1. Playback
      2. Capture
      3. [-] Duplex
      4. Device Scanning
      5. [?] Device Notification
  • plan9 [?]

  • netbsd [?]

  • freebsd [?]

  • openbsd [?]

  • dragonfly [?]

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture

func Capture() (sound.Source, error)

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

func CaptureWith(v sound.Form, co sample.Codec, b int) (sound.Source, error)

CaptureWith opens a sound.Source with the specified sample codec and buffer size.

func Connect

func Connect(pkgSel func(string) bool) (host.Entry, error)

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

func ConnectTo(name string, pkgSel func(string) bool) (host.Entry, error)

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 Duplex

func Duplex(in, out sound.Form) (sound.Duplex, error)

Duplex tries to return a sound.Duplex.

func DuplexWith

func DuplexWith(in, out sound.Form, co sample.Codec, b int) (sound.Duplex, error)

DuplexWith tries to return a sound.Duplex.

func EntryNames

func EntryNames() []string

EntryNames returns the names of host entry points.

func Play

func Play(src sound.Source) error

Play tries to play a sound.Source default settings with the default entry, returning a non-nil in case of failure.

func PlayWith

func PlayWith(src sound.Source, co sample.Codec, b int) error

PlayWith

func Player

func Player(v sound.Form) (sound.Sink, error)

Player tries to return a sound.Sink to which Sends are played to some system output. Default entry and settings are applied.

func PlayerWith

func PlayerWith(v sound.Form, co sample.Codec, b int) (sound.Sink, error)

PlayerWith tries to return a sound.Sink for playback with the specified sample codec and buffer size b.

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.

Jump to

Keyboard shortcuts

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