portaudio

package module
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 6 Imported by: 0

README

Portaudio

GoDoc Go Report Card Test codecov

Play audio with portaudio API.

Documentation

Overview

Package portaudio allows to play audio with Portaudio API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Devices

func Devices() ([]Device, []Device, []Device, error)

Devices return devices available through portaudio. First slice contains devices that have input channels, second slice contains devices that have output channels and third slice contains devices that doesn't have any channels.

func Initialize

func Initialize() error

Initialize initializes internal portaudio structures. Must be called before any other call to this package.

func Sink

Sink represets portaudio sink which allows to play audio. If no device is provided, the current system default will be used. Sink returns new portaudio sink allocator closure.

func Terminate

func Terminate() error

Terminate cleans up internal portaudio structures. Must be called after all streams are closed.

Types

type Device

type Device struct {
	// contains filtered or unexported fields
}

Device is the device accessed through portaudio.

func DefaultInputDevice

func DefaultInputDevice() (Device, error)

DefaultInputDevice returns input device used by system as default at the moment.

func DefaultOutputDevice

func DefaultOutputDevice() (Device, error)

DefaultOutputDevice returns output device used by system as default at the moment.

Jump to

Keyboard shortcuts

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