forked from gen2brain/malgo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenumerations.go
121 lines (106 loc) · 2.66 KB
/
enumerations.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
package malgo
// Backend type.
type Backend uint32
// Backend enumeration.
const (
BackendNull Backend = iota
BackendWasapi
BackendDsound
BackendWinmm
BackendAlsa
BackendPulseAudio
BackendJack
BackendCoreAudio
BackendSndio
BackendAudio4
BackendOss
BackendOpensl
BackendOpenal
BackendSdl
)
// DeviceType type.
type DeviceType uint32
// DeviceType enumeration.
const (
Playback DeviceType = iota
Capture
)
// ShareMode type.
type ShareMode uint32
// ShareMode enumeration.
const (
Shared ShareMode = iota
Exclusive
)
// PerformanceProfile type.
type PerformanceProfile uint32
// PerformanceProfile enumeration.
const (
LowLatency PerformanceProfile = iota
Conservative
)
// FormatType type.
type FormatType uint32
// Format enumeration.
const (
FormatUnknown FormatType = iota
FormatU8
FormatS16
FormatS24
FormatS32
FormatF32
)
// ThreadPriority type.
type ThreadPriority int32
// ThreadPriority enumeration.
const (
ThreadPriorityIdle ThreadPriority = -5
ThreadPriorityLowest ThreadPriority = -4
ThreadPriorityLow ThreadPriority = -3
ThreadPriorityNormal ThreadPriority = -2
ThreadPriorityHigh ThreadPriority = -1
ThreadPriorityHighest ThreadPriority = 0
ThreadPriorityRealtime ThreadPriority = 1
ThreadPriorityDefault ThreadPriority = 0
)
// Result type.
type Result int32
// Return codes.
const (
Success = 0
Error = -1
InvalidArgs = -2
InvalidOperation = -3
OutOfMemory = -4
FormatNotSupported = -5
NoBackend = -6
NoDevice = -7
APINotFound = -8
DeviceBusy = -9
DeviceNotInitialized = -10
DeviceNotStarted = -11
DeviceNotStopped = -12
DeviceAlreadyStarted = -13
DeviceAlreadyStarting = -14
DeviceAlreadyStopped = -15
DeviceAlreadyStopping = -16
FailedToMapDeviceBuffer = -17
FailedToUnmapDeviceBuffer = -18
FailedToInitBackend = -19
FailedToReadDataFromClient = -20
FailedToReadDataFromDevice = -21
FailedToSendDataToClient = -22
FailedToSendDataToDevice = -23
FailedToOpenBackendDevice = -24
FailedToStartBackendDevice = -25
FailedToStopBackendDevice = -26
FailedToConfigureBackendDevice = -27
FailedToCreateMutex = -28
FailedToCreateEvent = -29
FailedToCreateThread = -30
InvalidDeviceConfig = -31
AccessDenied = -32
TooLarge = -33
DeviceUnavailable = -34
Timeout = -35
)