kopia lustrzana https://github.com/craigerl/digipi
48 wiersze
1.6 KiB
Plaintext
48 wiersze
1.6 KiB
Plaintext
// Code generated by cmd/cgo; DO NOT EDIT.
|
|
|
|
//line /home/pi/go/src/github.com/mesilliac/pulse-simple/bufferattr.go:1:1
|
|
package pulse
|
|
|
|
/*
|
|
#cgo pkg-config: libpulse-simple
|
|
|
|
#include <stdlib.h>
|
|
#include <pulse/simple.h>
|
|
*/
|
|
import _ "unsafe"
|
|
|
|
// BufferAttr holds information about desired data transfer buffer sizes.
|
|
// All values are recommended to be initialized to (uint32) - 1,
|
|
// which will choose default values depending on the server.
|
|
type BufferAttr struct {
|
|
Maxlength uint32 // Playback and Capture, maximum buffer size in bytes
|
|
Tlength uint32 // Playback-only, target buffer size in bytes
|
|
Prebuf uint32 // Playback-only, pre-bufferring in bytes
|
|
Minreq uint32 // Plyback-only, minimum server-client request size in bytes
|
|
Fragsize uint32 // Capture-only, fragment size in bytes
|
|
}
|
|
|
|
// NewBufferAttr initializes a BufferAttr with values indicating default.
|
|
func NewBufferAttr() *BufferAttr {
|
|
return &BufferAttr{
|
|
Maxlength: ^uint32(0),
|
|
Tlength: ^uint32(0),
|
|
Prebuf: ^uint32(0),
|
|
Minreq: ^uint32(0),
|
|
Fragsize: ^uint32(0),
|
|
}
|
|
}
|
|
|
|
func (b *BufferAttr) toC() * /*line :33:29*/_Ctype_pa_buffer_attr /*line :33:45*/ {
|
|
if b == nil {
|
|
return nil
|
|
}
|
|
return & /*line :37:10*/_Ctype_pa_buffer_attr /*line :37:26*/{
|
|
maxlength: /*line :38:14*/_Ctype_uint32_t /*line :38:24*/(b.Maxlength),
|
|
tlength: /*line :39:14*/_Ctype_uint32_t /*line :39:24*/(b.Tlength),
|
|
prebuf: /*line :40:14*/_Ctype_uint32_t /*line :40:24*/(b.Prebuf),
|
|
minreq: /*line :41:14*/_Ctype_uint32_t /*line :41:24*/(b.Minreq),
|
|
fragsize: /*line :42:14*/_Ctype_uint32_t /*line :42:24*/(b.Fragsize),
|
|
}
|
|
}
|