Documentation
¶
Overview ¶
Package portaudio provides Go bindings for PortAudio, compiled from vendored source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize() error
Initialize must be called before any other portaudio function.
Types ¶
type DeviceInfo ¶
type DeviceInfo struct {
Index int
Name string
MaxInputChannels int
MaxOutputChannels int
DefaultSampleRate float64
IsDefaultInput bool
IsDefaultOutput bool
InputLatency time.Duration
OutputLatency time.Duration
}
func DefaultInputDevice ¶
func DefaultInputDevice() (*DeviceInfo, error)
func DefaultOutputDevice ¶
func DefaultOutputDevice() (*DeviceInfo, error)
func FindDevice ¶
func FindDevice(query string, input bool) (*DeviceInfo, error)
FindDevice finds a device by index (numeric string) or name substring (case-insensitive).
func ListDevices ¶
func ListDevices() ([]DeviceInfo, error)
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func OpenInputStream ¶
func OpenInputStream(device *DeviceInfo, sampleRate, channels, framesPerBuffer int) (*Stream, error)
func OpenOutputStream ¶
func OpenOutputStream(device *DeviceInfo, sampleRate, channels, framesPerBuffer int) (*Stream, error)
func (*Stream) Info ¶
func (s *Stream) Info() StreamInfo
Click to show internal directories.
Click to hide internal directories.