portaudio

package
v0.0.0-...-a19c61f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package portaudio provides a portaudio backend for the engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Terminate

func Terminate() error

Terminate terminates portaudio. This is called after all client's have shut down.

Types

type DeviceList

type DeviceList []*portaudio.DeviceInfo

DeviceList is a list of portaudio devices.

func Initialize

func Initialize() (DeviceList, error)

Initialize initializes portaudio and returns the list of devices on the machine.

func (DeviceList) String

func (l DeviceList) String() string

type PortAudio

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

PortAudio is a wrapper for a portaudio client.

func New

func New(inDeviceIndex, outDeviceIndex int, latency string, frameSize, sampleRate int) (*PortAudio, error)

New returns a new PortAudio.

func (*PortAudio) Devices

func (pa *PortAudio) Devices() (in *portaudio.DeviceInfo, out *portaudio.DeviceInfo)

Devices returns the devices currently in use by portaudio.

func (*PortAudio) FrameSize

func (pa *PortAudio) FrameSize() int

FrameSize returns the low-level frame size used by PortAudio.

func (*PortAudio) SampleRate

func (pa *PortAudio) SampleRate() int

SampleRate returns the sample rate

func (*PortAudio) Start

func (pa *PortAudio) Start(callback func([]float32, [][]float32)) error

Start starts the portaudio stream.

func (*PortAudio) Stop

func (pa *PortAudio) Stop() error

Stop stops the portaudio stream.

Jump to

Keyboard shortcuts

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