Categorygithub.com/jfreymuth/pulse
modulepackage
0.1.1
Repository: https://github.com/jfreymuth/pulse.git
Documentation: pkg.go.dev

# README

pulse

GoDoc

PulseAudio client implementation in pure Go.

Based on github.com/yobert/pulse, which provided a very useful starting point.

Uses the pulseaudio native protocol to play audio without any CGO. The proto package exposes a very low-level API while the pulse package is more convenient to use.

status

  • proto supports almost all of the protocol, shm support is still missing.

  • pulse implements sufficient functionality for most audio playing/recording applications.

examples

see demo/play and demo/record

# Packages

No description provided by the author
No description provided by the author

# Functions

ClientApplicationIconName sets the application icon using an xdg icon name.
ClientApplicationName sets the application name.
ClientServerString will override the default server strings.
NewClient connects to the server.
NewReader creates a reader from an io.Reader and a format.
NewWriter creates a writer from an io.Writer and a format.
PlaybackBufferSize sets the size of the server-side buffer.
PlaybackChannels sets a stream to use a custom channel map.
PlaybackLatency sets the stream's latency in seconds.
PlaybackMediaIconName sets the streams media icon using an xdg icon name.
PlaybackMediaName sets the streams media name.
PlaybackRawOption can be used to create custom options.
PlaybackSampleRate sets the stream's sample rate.
PlaybackSink sets the sink the stream should send audio to.
RecordBufferFragmentSize sets the fragment size.
RecordChannels sets a stream to use a custom channel map.
RecordLatency sets the stream's latency in seconds.
RecordMediaIconName sets the streams media icon using an xdg icon name.
RecordMediaName sets the streams media name.
RecordMonitor sets the stream to receive audio sent to the sink.
RecordRawOption can be used to create custom options.
RecordSampleRate sets the stream's sample rate.
RecordSource sets the source the stream should receive audio from.

# Constants

EndOfData is a special error value that can be returned by a reader to stop the stream.
ErrConnectionClosed is a special error value indicating that the server closed the connection.

# Variables

PlaybackMono sets a stream to a single channel.
PlaybackStereo sets a stream to two channels.
RecordMono sets a stream to a single channel.
RecordStereo sets a stream to two channels.

# Structs

The Client is the connection to the pulseaudio server.
A PlaybackStream is used for playing audio.
A RecordStream is used for recording audio.
A Sink is an output device.
A Source is an input device.

# Interfaces

A Reader provides audio data in a specific format.
A Writer accepts audio data in a specific format.

# Type aliases

A ClientOption supplies configuration when creating the client.
Float32Reader implements the Reader interface.
Float32Writer implements the Writer interface.
Int16Reader implements the Reader interface.
Int16Writer implements the Writer interface.
Int32Reader implements the Reader interface.
Int32Writer implements the Writer interface.
A PlaybackOption supplies configuration when creating streams.
A RecordOption supplies configuration when creating streams.
Uint8Reader implements the Reader interface.
Uint8Writer implements the Writer interface.