Documentation ¶
Index ¶
- Constants
- func CloseCards(cards []*Card)
- type AccessType
- type Buffer
- type BufferFormat
- type Card
- type Device
- func (device *Device) BufferFormat() BufferFormat
- func (device *Device) BytesPerFrame() int
- func (device *Device) Close()
- func (device *Device) Debug(v bool)
- func (device *Device) NegotiateBufferSize(buffer_sizes ...int) (int, error)
- func (device *Device) NegotiateChannels(channels ...int) (int, error)
- func (device *Device) NegotiateFormat(formats ...FormatType) (FormatType, error)
- func (device *Device) NegotiatePeriodSize(period_sizes ...int) (int, error)
- func (device *Device) NegotiateRate(rates ...int) (int, error)
- func (device *Device) NewBufferDuration(d time.Duration) Buffer
- func (device *Device) NewBufferSeconds(seconds int) Buffer
- func (device *Device) Open() error
- func (device *Device) Prepare() error
- func (device *Device) Read(buf []byte) error
- func (device Device) String() string
- func (device *Device) Write(buf []byte, frames int) error
- type DeviceType
- type Flags
- type FormatType
- type SubformatType
Constants ¶
View Source
const ( StandardSubformat SubformatType = iota SubformatTypeFirst = StandardSubformat SubformatTypeLast = StandardSubformat )
Variables ¶
This section is empty.
Functions ¶
func CloseCards ¶
func CloseCards(cards []*Card)
Types ¶
type AccessType ¶
type AccessType int
const ( MmapInterleaved AccessType = iota MmapNonInterleaved MmapComplex RWInterleaved RWNonInterleaved AccessTypeLast = RWNonInterleaved AccessTypeFirst = MmapInterleaved )
func (AccessType) String ¶
func (a AccessType) String() string
type Buffer ¶
type Buffer struct { Format BufferFormat Data []byte }
type BufferFormat ¶
type BufferFormat struct { SampleFormat FormatType Rate int Channels int }
func (BufferFormat) String ¶
func (bp BufferFormat) String() string
type Device ¶
type Device struct { Type DeviceType Number int Play, Record bool Path string Title string // contains filtered or unexported fields }
func (*Device) BufferFormat ¶
func (device *Device) BufferFormat() BufferFormat
BufferFormat() is not valid until after Prepare() is called
func (*Device) BytesPerFrame ¶
func (*Device) NegotiateBufferSize ¶
func (*Device) NegotiateChannels ¶
func (*Device) NegotiateFormat ¶
func (device *Device) NegotiateFormat(formats ...FormatType) (FormatType, error)
func (*Device) NegotiatePeriodSize ¶
func (*Device) NewBufferSeconds ¶
This function is deprecated and will be removed at some point. Please use NewBufferDuration
type DeviceType ¶
type DeviceType int
const ( UnknownDeviceType DeviceType = iota PCM )
func (DeviceType) String ¶
func (t DeviceType) String() string
type FormatType ¶
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 ¶
func (f FormatType) String() string
type SubformatType ¶
type SubformatType int
func (SubformatType) String ¶
func (f SubformatType) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.