forked from gen2brain/malgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice_config.go
43 lines (37 loc) · 1.02 KB
/
device_config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package malgo
// #include "malgo.h"
import "C"
import "unsafe"
// AlsaDeviceConfig type.
type AlsaDeviceConfig struct {
NoMMap uint32
}
// PulseDeviceConfig type.
type PulseDeviceConfig struct {
StreamName *byte
}
// DeviceConfig type.
type DeviceConfig struct {
Format FormatType
Channels uint32
SampleRate uint32
ChannelMap [32]byte
BufferSizeInFrames uint32
BufferSizeInMilliseconds uint32
Periods uint32
ShareMode ShareMode
PerformanceProfile PerformanceProfile
_ uintptr
_ uintptr
_ uintptr
Alsa AlsaDeviceConfig
_ [4]byte
Pulse PulseDeviceConfig
}
func (d *DeviceConfig) cptr() *C.mal_device_config {
return (*C.mal_device_config)(unsafe.Pointer(d))
}
// DefaultDeviceConfig returns a default device config.
func DefaultDeviceConfig() DeviceConfig {
return DeviceConfig{}
}