Skip to content

pkgs/audio/portaudio

Provide native PortAudio capture/playback backend, and adapt the device stream to pcm formats and writers.

Go API References

Core structure and main function

SymbolFunction
Driver / NewDriverManage PortAudio backend lifecycle.
DeviceInfoDescription capture/playback device.
StreamConfig / StreamConfigFromPCMConfigure device, format and frames per buffer.
CaptureStream / OpenCaptureOpen audio input.
PlaybackStream / OpenPlaybackOpen audio output.
PCMPlaybackWriter / OpenPCMPlaybackWriterWrite PCM chunks to the playback stream.
ListDevices / DefaultInputDevice / DefaultOutputDeviceQuery the device.
NativeRuntimeSupported / BackendNameDescribe the current platform backend availability.

Platform and CGO support are determined by the backend matrix; unsupported builds must return explicit capability status or errors.