simple

package
v0.0.0-...-dddda54 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleFormatU8        = C.PA_SAMPLE_U8
	SampleFormatS16NE     = C.PA_SAMPLE_S16NE
	SampleFormatS16LE     = C.PA_SAMPLE_S16LE
	SampleFormatS16BE     = C.PA_SAMPLE_S16BE
	SampleFormatS24LE     = C.PA_SAMPLE_S24LE
	SampleFormatS24BE     = C.PA_SAMPLE_S24BE
	SampleFormatFloat32LE = C.PA_SAMPLE_FLOAT32LE
	SampleFormatFloat32BE = C.PA_SAMPLE_FLOAT32BE
	SampleFormatS32LE     = C.PA_SAMPLE_S32LE
	SampleFormatS32BE     = C.PA_SAMPLE_S32BE
)
View Source
const (
	StreamDirectionPlayback = C.PA_STREAM_PLAYBACK
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	Ptr unsafe.Pointer
}

func NewConn

func NewConn(server, name string, dir StreamDirection, dev, streamName string,
	sampleSpec *SampleSpec) (Conn, error)

server: server name, empty for default name: A descriptive name for this client, application name dir: Open this stream for recording or playback? dev: sink or source name, empty for default streamName: A descriptive name for this stream (application name, song title, ...) sampleSpec: The sample type to use

func (Conn) Drain

func (c Conn) Drain() (int, error)

func (Conn) Flush

func (c Conn) Flush() (int, error)

func (Conn) Free

func (c Conn) Free()

Close and free

func (Conn) Write

func (c Conn) Write(data unsafe.Pointer, bytes uint) (int, error)

type Error

type Error struct {
	Code int
	Fn   string
}

func (Error) Error

func (err Error) Error() string

type SampleFormat

type SampleFormat uint

type SampleSpec

type SampleSpec struct {
	Format   SampleFormat
	Rate     uint32
	Channels uint8
}

type StreamDirection

type StreamDirection uint

Jump to

Keyboard shortcuts

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