alsa: github.com/yobert/alsa Index | Files | Directories

package alsa

import "github.com/yobert/alsa"

Index

Package Files

asound.go buffer.go card.go device.go ioctl.go negotiate.go param.go

Constants

const (
    StandardSubformat  SubformatType = iota
    SubformatTypeFirst               = StandardSubformat
    SubformatTypeLast                = StandardSubformat
)

func CloseCards Uses

func CloseCards(cards []*Card)

type AccessType Uses

type AccessType int
const (
    MmapInterleaved AccessType = iota
    MmapNonInterleaved
    MmapComplex
    RWInterleaved
    RWNonInterleaved
    AccessTypeLast  = RWNonInterleaved
    AccessTypeFirst = MmapInterleaved
)

func (AccessType) String Uses

func (a AccessType) String() string

type Buffer Uses

type Buffer struct {
    Format BufferFormat
    Data   []byte
}

type BufferFormat Uses

type BufferFormat struct {
    SampleFormat FormatType
    Rate         int
    Channels     int
}

func (BufferFormat) String Uses

func (bp BufferFormat) String() string

type Card Uses

type Card struct {
    Path   string
    Title  string
    Number int
    // contains filtered or unexported fields
}

func OpenCards Uses

func OpenCards() ([]*Card, error)

func (*Card) Devices Uses

func (card *Card) Devices() ([]*Device, error)

func (Card) String Uses

func (card Card) String() string

type Device Uses

type Device struct {
    Type         DeviceType
    Number       int
    Play, Record bool

    Path  string
    Title string
    // contains filtered or unexported fields
}

func (*Device) BufferFormat Uses

func (device *Device) BufferFormat() BufferFormat

BufferFormat() is not valid until after Prepare() is called

func (*Device) BytesPerFrame Uses

func (device *Device) BytesPerFrame() int

func (*Device) Close Uses

func (device *Device) Close()

func (*Device) Debug Uses

func (device *Device) Debug(v bool)

func (*Device) NegotiateBufferSize Uses

func (device *Device) NegotiateBufferSize(buffer_sizes ...int) (int, error)

func (*Device) NegotiateChannels Uses

func (device *Device) NegotiateChannels(channels ...int) (int, error)

func (*Device) NegotiateFormat Uses

func (device *Device) NegotiateFormat(formats ...FormatType) (FormatType, error)

func (*Device) NegotiatePeriodSize Uses

func (device *Device) NegotiatePeriodSize(period_sizes ...int) (int, error)

func (*Device) NegotiateRate Uses

func (device *Device) NegotiateRate(rates ...int) (int, error)

func (*Device) NewBufferDuration Uses

func (device *Device) NewBufferDuration(d time.Duration) Buffer

func (*Device) NewBufferSeconds Uses

func (device *Device) NewBufferSeconds(seconds int) Buffer

This function is deprecated and will be removed at some point. Please use NewBufferDuration

func (*Device) Open Uses

func (device *Device) Open() error

func (*Device) Prepare Uses

func (device *Device) Prepare() error

func (*Device) Read Uses

func (device *Device) Read(buf []byte) error

func (Device) String Uses

func (device Device) String() string

func (*Device) Write Uses

func (device *Device) Write(buf []byte, frames int) error

type DeviceType Uses

type DeviceType int
const (
    UnknownDeviceType DeviceType = iota
    PCM
)

func (DeviceType) String Uses

func (t DeviceType) String() string

type Flags Uses

type Flags uint32
const (
    OpenMin Flags = 1 << iota
    OpenMax
    Integer
    Empty
)

func (Flags) String Uses

func (f Flags) String() string

type FormatType Uses

type FormatType int
const (
    S8  FormatType = iota
    U8
    S16_LE
    S16_BE
    U16_LE
    U16_BE
    S24_LE
    S24_BE
    U24_LE
    U24_BE
    S32_LE
    S32_BE
    U32_LE
    U32_BE
    FLOAT_LE
    FLOAT_BE
    FLOAT64_LE
    FLOAT64_BE
    // There are so many more...
    FormatTypeLast  = FLOAT64_BE
    FormatTypeFirst = S8
)
const (
    Unknown FormatType = -1
)

func (FormatType) String Uses

func (f FormatType) String() string

type SubformatType Uses

type SubformatType int

func (SubformatType) String Uses

func (f SubformatType) String() string

Directories

PathSynopsis
alsatype
cmd/beep
cmd/echoback
colorPackage color is a very basic ANSI escape sequence colorer.
pcm
pcm/state

Package alsa imports 12 packages (graph) and is imported by 2 packages. Updated 2018-07-01. Refresh now. Tools for package owners.