libmdr 0.1.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libmdr/__init__.py +18 -0
- libmdr/_api.py +10 -0
- libmdr/_dll.py +92 -0
- libmdr/_generated_api.py +428 -0
- libmdr/_generated_constants.py +342 -0
- libmdr/_generated_result.py +25 -0
- libmdr/_native/mdr-shared.dll +0 -0
- libmdr/connection.py +73 -0
- libmdr/constants.py +526 -0
- libmdr/headphones.py +620 -0
- libmdr/result.py +29 -0
- libmdr-0.1.0.dist-info/METADATA +17 -0
- libmdr-0.1.0.dist-info/RECORD +16 -0
- libmdr-0.1.0.dist-info/WHEEL +5 -0
- libmdr-0.1.0.dist-info/licenses/LICENSE +21 -0
- libmdr-0.1.0.dist-info/top_level.txt +1 -0
libmdr/__init__.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Python bindings for libmdr (mdr-shared C ABI)."""
|
|
2
|
+
|
|
3
|
+
from . import constants, result
|
|
4
|
+
from .connection import Connection, DeviceInfo
|
|
5
|
+
from .headphones import Headphones
|
|
6
|
+
from .result import ABI_VERSION, MDRError, check, result_string
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"ABI_VERSION",
|
|
10
|
+
"Connection",
|
|
11
|
+
"DeviceInfo",
|
|
12
|
+
"Headphones",
|
|
13
|
+
"MDRError",
|
|
14
|
+
"check",
|
|
15
|
+
"constants",
|
|
16
|
+
"result",
|
|
17
|
+
"result_string",
|
|
18
|
+
]
|
libmdr/_api.py
ADDED
libmdr/_dll.py
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""ctypes loader for mdr-shared."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import sys
|
|
7
|
+
from ctypes import CDLL, RTLD_GLOBAL
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
_LIB: CDLL | None = None
|
|
11
|
+
|
|
12
|
+
_ENV_OVERRIDE = "MDR_DLL"
|
|
13
|
+
|
|
14
|
+
_CANDIDATE_NAMES = (
|
|
15
|
+
"mdr-shared.dll",
|
|
16
|
+
"mdr.dll",
|
|
17
|
+
"libmdr-shared.so",
|
|
18
|
+
"libmdr-shared.dylib",
|
|
19
|
+
"mdr-shared.so",
|
|
20
|
+
"mdr-shared.dylib",
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _package_native_dir() -> Path:
|
|
25
|
+
return Path(__file__).resolve().parent / "_native"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _candidate_paths() -> list[Path]:
|
|
29
|
+
paths: list[Path] = []
|
|
30
|
+
override = os.environ.get(_ENV_OVERRIDE)
|
|
31
|
+
if override:
|
|
32
|
+
paths.append(Path(override))
|
|
33
|
+
|
|
34
|
+
native = _package_native_dir()
|
|
35
|
+
for name in _CANDIDATE_NAMES:
|
|
36
|
+
paths.append(native / name)
|
|
37
|
+
|
|
38
|
+
# Editable / in-tree builds may leave artifacts in the shared CMake tree.
|
|
39
|
+
repo_build = Path(__file__).resolve().parents[4] / "build" / "python"
|
|
40
|
+
if repo_build.is_dir():
|
|
41
|
+
for name in _CANDIDATE_NAMES:
|
|
42
|
+
paths.extend(repo_build.rglob(name))
|
|
43
|
+
|
|
44
|
+
return paths
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _load_path(path: Path) -> CDLL:
|
|
48
|
+
path = path.resolve()
|
|
49
|
+
if not path.is_file():
|
|
50
|
+
raise FileNotFoundError(path)
|
|
51
|
+
|
|
52
|
+
if sys.platform == "win32":
|
|
53
|
+
os.add_dll_directory(str(path.parent))
|
|
54
|
+
return CDLL(str(path))
|
|
55
|
+
|
|
56
|
+
mode = RTLD_GLOBAL if hasattr(os, "RTLD_GLOBAL") else 0
|
|
57
|
+
return CDLL(str(path), mode=mode)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def load() -> CDLL:
|
|
61
|
+
global _LIB
|
|
62
|
+
if _LIB is not None:
|
|
63
|
+
return _LIB
|
|
64
|
+
|
|
65
|
+
errors: list[str] = []
|
|
66
|
+
seen: set[Path] = set()
|
|
67
|
+
for candidate in _candidate_paths():
|
|
68
|
+
try:
|
|
69
|
+
resolved = candidate.resolve()
|
|
70
|
+
except OSError as exc:
|
|
71
|
+
errors.append(f"{candidate}: {exc}")
|
|
72
|
+
continue
|
|
73
|
+
if resolved in seen:
|
|
74
|
+
continue
|
|
75
|
+
seen.add(resolved)
|
|
76
|
+
try:
|
|
77
|
+
_LIB = _load_path(resolved)
|
|
78
|
+
return _LIB
|
|
79
|
+
except OSError as exc:
|
|
80
|
+
errors.append(f"{resolved}: {exc}")
|
|
81
|
+
|
|
82
|
+
hint = (
|
|
83
|
+
f"Set {_ENV_OVERRIDE} to the full path of mdr-shared "
|
|
84
|
+
f"(or mdr.dll), or `pip install -e libmdr` to build it."
|
|
85
|
+
)
|
|
86
|
+
raise FileNotFoundError(
|
|
87
|
+
"Unable to load mdr-shared.\n" + "\n".join(errors) + ("\n" + hint if errors else hint)
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def lib() -> CDLL:
|
|
92
|
+
return load()
|
libmdr/_generated_api.py
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
"""Generated from SonyHeadphonesClient
|
|
2
|
+
|
|
3
|
+
Do not edit this file directly; run ``python tooling/generate_bindings.py``.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from __future__ import annotations
|
|
7
|
+
|
|
8
|
+
from ctypes import (
|
|
9
|
+
CFUNCTYPE,
|
|
10
|
+
POINTER,
|
|
11
|
+
Structure,
|
|
12
|
+
c_char,
|
|
13
|
+
c_char_p,
|
|
14
|
+
c_int,
|
|
15
|
+
c_int8,
|
|
16
|
+
c_int16,
|
|
17
|
+
c_int32,
|
|
18
|
+
c_int64,
|
|
19
|
+
c_uint8,
|
|
20
|
+
c_uint16,
|
|
21
|
+
c_uint32,
|
|
22
|
+
c_uint64,
|
|
23
|
+
c_void_p,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
MDRResult = c_uint32
|
|
27
|
+
MDRPropertyType = c_uint32
|
|
28
|
+
MDRProtocolVersion = c_uint32
|
|
29
|
+
MDRBoolean = c_uint32
|
|
30
|
+
MDRFeatureAvailability = c_uint32
|
|
31
|
+
MDRTimeoutType = c_uint32
|
|
32
|
+
MDRHeadphonesInitFlags = c_uint32
|
|
33
|
+
MDRHeadphonesSyncFlags = c_uint32
|
|
34
|
+
MDRFeature = c_uint32
|
|
35
|
+
MDREvent = c_uint32
|
|
36
|
+
MDRPacketDirection = c_uint32
|
|
37
|
+
MDRText = c_uint32
|
|
38
|
+
MDRAudioCodec = c_uint32
|
|
39
|
+
MDRBatteryPart = c_uint32
|
|
40
|
+
MDRChargingState = c_uint32
|
|
41
|
+
MDRPlaybackStatus = c_uint32
|
|
42
|
+
MDRPlaybackAction = c_uint32
|
|
43
|
+
MDRSourceSwitchControlResult = c_uint32
|
|
44
|
+
MDRNoiseMode = c_uint32
|
|
45
|
+
MDRAdaptiveSensitivity = c_uint32
|
|
46
|
+
MDRNoiseButtonMode = c_uint32
|
|
47
|
+
MDRSpeechSensitivity = c_uint32
|
|
48
|
+
MDRSpeakTimeout = c_uint32
|
|
49
|
+
MDRListeningMode = c_uint32
|
|
50
|
+
MDRListeningBlocker = c_uint32
|
|
51
|
+
MDRVoiceAssistant = c_uint32
|
|
52
|
+
MDRVoiceAssistantKey = c_uint32
|
|
53
|
+
MDRRoomSize = c_uint32
|
|
54
|
+
MDREqualizerPreset = c_uint32
|
|
55
|
+
MDRDSEEType = c_uint32
|
|
56
|
+
MDRPairedDeviceCommand = c_uint32
|
|
57
|
+
MDRAlertAction = c_uint32
|
|
58
|
+
MDRGeneralSettingType = c_uint32
|
|
59
|
+
MDRAssignableAction = c_uint32
|
|
60
|
+
MDRWearingPowerMode = c_uint32
|
|
61
|
+
MDRWearingStatus = c_uint32
|
|
62
|
+
MDRAudioPriority = c_uint32
|
|
63
|
+
MDRAssignableActionKeyLocation = c_uint32
|
|
64
|
+
MDRAssignableActionKeyType = c_uint32
|
|
65
|
+
|
|
66
|
+
class MDRDeviceInfo(Structure):
|
|
67
|
+
pass
|
|
68
|
+
|
|
69
|
+
MDRDeviceInfo._fields_ = [
|
|
70
|
+
("szDeviceName", c_char * 256),
|
|
71
|
+
("szDeviceMacAddress", c_char * 18),
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
class MDRConnection(Structure):
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
MDRConnectionConnect = CFUNCTYPE(MDRResult, c_void_p, c_char_p, c_char_p)
|
|
78
|
+
MDRConnectionDisconnect = CFUNCTYPE(None, c_void_p)
|
|
79
|
+
MDRConnectionRecv = CFUNCTYPE(MDRResult, c_void_p, c_char_p, c_int, POINTER(c_int))
|
|
80
|
+
MDRConnectionSend = CFUNCTYPE(MDRResult, c_void_p, c_char_p, c_int, POINTER(c_int))
|
|
81
|
+
MDRConnectionPoll = CFUNCTYPE(MDRResult, c_void_p, c_int)
|
|
82
|
+
MDRConnectionGetDevicesList = CFUNCTYPE(MDRResult, c_void_p, POINTER(POINTER(MDRDeviceInfo)), POINTER(c_int))
|
|
83
|
+
MDRConnectionFreeDevicesList = CFUNCTYPE(MDRResult, c_void_p, POINTER(POINTER(MDRDeviceInfo)))
|
|
84
|
+
MDRConnectionGetLastError = CFUNCTYPE(c_char_p, c_void_p)
|
|
85
|
+
|
|
86
|
+
MDRConnection._fields_ = [
|
|
87
|
+
("user", c_void_p),
|
|
88
|
+
("connect", MDRConnectionConnect),
|
|
89
|
+
("disconnect", MDRConnectionDisconnect),
|
|
90
|
+
("recv", MDRConnectionRecv),
|
|
91
|
+
("send", MDRConnectionSend),
|
|
92
|
+
("poll", MDRConnectionPoll),
|
|
93
|
+
("getDevicesList", MDRConnectionGetDevicesList),
|
|
94
|
+
("freeDevicesList", MDRConnectionFreeDevicesList),
|
|
95
|
+
("getLastError", MDRConnectionGetLastError),
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
class MDRModel(Structure):
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
MDRModel._fields_ = [
|
|
102
|
+
("protocol_version", c_uint32),
|
|
103
|
+
("audio_codec", MDRAudioCodec),
|
|
104
|
+
("model_color", c_uint32),
|
|
105
|
+
]
|
|
106
|
+
|
|
107
|
+
class MDRBattery(Structure):
|
|
108
|
+
pass
|
|
109
|
+
|
|
110
|
+
MDRBattery._fields_ = [
|
|
111
|
+
("part", MDRBatteryPart),
|
|
112
|
+
("present", MDRBoolean),
|
|
113
|
+
("level_percent", c_uint32),
|
|
114
|
+
("update_threshold_percent", c_uint32),
|
|
115
|
+
("charging", MDRChargingState),
|
|
116
|
+
]
|
|
117
|
+
|
|
118
|
+
class MDRPlayback(Structure):
|
|
119
|
+
pass
|
|
120
|
+
|
|
121
|
+
MDRPlayback._fields_ = [
|
|
122
|
+
("status", MDRPlaybackStatus),
|
|
123
|
+
("volume", c_uint32),
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
class MDRPlaybackCommand(Structure):
|
|
127
|
+
pass
|
|
128
|
+
|
|
129
|
+
MDRPlaybackCommand._fields_ = [
|
|
130
|
+
("action", MDRPlaybackAction),
|
|
131
|
+
]
|
|
132
|
+
|
|
133
|
+
class MDRNoiseControl(Structure):
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
MDRNoiseControl._fields_ = [
|
|
137
|
+
("mode", MDRNoiseMode),
|
|
138
|
+
("ambient_level", c_uint32),
|
|
139
|
+
("changing_asm_level", MDRBoolean),
|
|
140
|
+
("focus_on_voice", MDRBoolean),
|
|
141
|
+
("button_mode", MDRNoiseButtonMode),
|
|
142
|
+
("adaptive_ambient", MDRBoolean),
|
|
143
|
+
("adaptive_sensitivity", MDRAdaptiveSensitivity),
|
|
144
|
+
]
|
|
145
|
+
|
|
146
|
+
class MDRSpeakToChat(Structure):
|
|
147
|
+
pass
|
|
148
|
+
|
|
149
|
+
MDRSpeakToChat._fields_ = [
|
|
150
|
+
("enabled", MDRBoolean),
|
|
151
|
+
("sensitivity", MDRSpeechSensitivity),
|
|
152
|
+
("timeout", MDRSpeakTimeout),
|
|
153
|
+
]
|
|
154
|
+
|
|
155
|
+
class MDRListening(Structure):
|
|
156
|
+
pass
|
|
157
|
+
|
|
158
|
+
MDRListening._fields_ = [
|
|
159
|
+
("mode", MDRListeningMode),
|
|
160
|
+
("background_room", MDRRoomSize),
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
class MDRListeningStatus(Structure):
|
|
164
|
+
pass
|
|
165
|
+
|
|
166
|
+
MDRListeningStatus._fields_ = [
|
|
167
|
+
("available", MDRBoolean),
|
|
168
|
+
("blockers", MDRListeningBlocker),
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
class MDRVoiceAssistantSettings(Structure):
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
MDRVoiceAssistantSettings._fields_ = [
|
|
175
|
+
("assistant", MDRVoiceAssistant),
|
|
176
|
+
("available", MDRBoolean),
|
|
177
|
+
("key", MDRVoiceAssistantKey),
|
|
178
|
+
]
|
|
179
|
+
|
|
180
|
+
class MDRVoiceAssistantOption(Structure):
|
|
181
|
+
pass
|
|
182
|
+
|
|
183
|
+
MDRVoiceAssistantOption._fields_ = [
|
|
184
|
+
("assistant", MDRVoiceAssistant),
|
|
185
|
+
("available", MDRBoolean),
|
|
186
|
+
]
|
|
187
|
+
|
|
188
|
+
class MDREqualizer(Structure):
|
|
189
|
+
pass
|
|
190
|
+
|
|
191
|
+
MDREqualizer._fields_ = [
|
|
192
|
+
("preset", MDREqualizerPreset),
|
|
193
|
+
("clear_bass", c_int32),
|
|
194
|
+
("band_count", c_uint32),
|
|
195
|
+
("dsee_enabled", MDRBoolean),
|
|
196
|
+
("dsee_type", MDRDSEEType),
|
|
197
|
+
("available", MDRBoolean),
|
|
198
|
+
("dsee_available", MDRBoolean),
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
class MDRPairedDevice(Structure):
|
|
202
|
+
pass
|
|
203
|
+
|
|
204
|
+
MDRPairedDevice._fields_ = [
|
|
205
|
+
("connected", MDRBoolean),
|
|
206
|
+
("playback_device", MDRBoolean),
|
|
207
|
+
("macAddress", c_char * 18),
|
|
208
|
+
("name", c_char * 128),
|
|
209
|
+
]
|
|
210
|
+
|
|
211
|
+
class MDRPairedDeviceAction(Structure):
|
|
212
|
+
pass
|
|
213
|
+
|
|
214
|
+
MDRPairedDeviceAction._fields_ = [
|
|
215
|
+
("command", MDRPairedDeviceCommand),
|
|
216
|
+
("device_id", c_char_p),
|
|
217
|
+
("device_id_size", c_uint32),
|
|
218
|
+
]
|
|
219
|
+
|
|
220
|
+
class MDRPairing(Structure):
|
|
221
|
+
pass
|
|
222
|
+
|
|
223
|
+
MDRPairing._fields_ = [
|
|
224
|
+
("enabled", MDRBoolean),
|
|
225
|
+
]
|
|
226
|
+
|
|
227
|
+
class MDRGeneralSettingInfo(Structure):
|
|
228
|
+
pass
|
|
229
|
+
|
|
230
|
+
MDRGeneralSettingInfo._fields_ = [
|
|
231
|
+
("index", c_uint32),
|
|
232
|
+
("type", MDRGeneralSettingType),
|
|
233
|
+
("writable", MDRBoolean),
|
|
234
|
+
]
|
|
235
|
+
|
|
236
|
+
class MDRGeneralSetting(Structure):
|
|
237
|
+
pass
|
|
238
|
+
|
|
239
|
+
MDRGeneralSetting._fields_ = [
|
|
240
|
+
("index", c_uint32),
|
|
241
|
+
("boolean_value", MDRBoolean),
|
|
242
|
+
]
|
|
243
|
+
|
|
244
|
+
class MDRAssignableControl(Structure):
|
|
245
|
+
pass
|
|
246
|
+
|
|
247
|
+
MDRAssignableControl._fields_ = [
|
|
248
|
+
("location", MDRAssignableActionKeyLocation),
|
|
249
|
+
("type", MDRAssignableActionKeyType),
|
|
250
|
+
("action", MDRAssignableAction),
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
class MDRPower(Structure):
|
|
254
|
+
pass
|
|
255
|
+
|
|
256
|
+
MDRPower._fields_ = [
|
|
257
|
+
("auto_power_off_minutes", c_uint32),
|
|
258
|
+
("wearing_power", MDRWearingPowerMode),
|
|
259
|
+
("auto_pause", MDRBoolean),
|
|
260
|
+
("head_gesture", MDRBoolean),
|
|
261
|
+
("shutdown_requested", MDRBoolean),
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
class MDRVoiceGuidance(Structure):
|
|
265
|
+
pass
|
|
266
|
+
|
|
267
|
+
MDRVoiceGuidance._fields_ = [
|
|
268
|
+
("enabled", MDRBoolean),
|
|
269
|
+
("volume", c_int32),
|
|
270
|
+
]
|
|
271
|
+
|
|
272
|
+
class MDRConnectionMode(Structure):
|
|
273
|
+
pass
|
|
274
|
+
|
|
275
|
+
MDRConnectionMode._fields_ = [
|
|
276
|
+
("audio_priority", MDRAudioPriority),
|
|
277
|
+
]
|
|
278
|
+
|
|
279
|
+
class MDRSafeListening(Structure):
|
|
280
|
+
pass
|
|
281
|
+
|
|
282
|
+
MDRSafeListening._fields_ = [
|
|
283
|
+
("sound_pressure", c_uint32),
|
|
284
|
+
("preview", MDRBoolean),
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
MDRPacketCallback = CFUNCTYPE(None, c_void_p, MDRPacketDirection, c_uint64, POINTER(c_uint8), c_int)
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
def bind(lib: object) -> None:
|
|
291
|
+
lib.mdrResultString.argtypes = [MDRResult]
|
|
292
|
+
lib.mdrResultString.restype = c_char_p
|
|
293
|
+
lib.mdrConnectionConnect.argtypes = [POINTER(MDRConnection), c_char_p, c_char_p]
|
|
294
|
+
lib.mdrConnectionConnect.restype = MDRResult
|
|
295
|
+
lib.mdrConnectionDisconnect.argtypes = [POINTER(MDRConnection)]
|
|
296
|
+
lib.mdrConnectionDisconnect.restype = None
|
|
297
|
+
lib.mdrConnectionRecv.argtypes = [POINTER(MDRConnection), c_char_p, c_int, POINTER(c_int)]
|
|
298
|
+
lib.mdrConnectionRecv.restype = MDRResult
|
|
299
|
+
lib.mdrConnectionSend.argtypes = [POINTER(MDRConnection), c_char_p, c_int, POINTER(c_int)]
|
|
300
|
+
lib.mdrConnectionSend.restype = MDRResult
|
|
301
|
+
lib.mdrConnectionPoll.argtypes = [POINTER(MDRConnection), c_int]
|
|
302
|
+
lib.mdrConnectionPoll.restype = MDRResult
|
|
303
|
+
lib.mdrConnectionGetDevicesList.argtypes = [POINTER(MDRConnection), POINTER(POINTER(MDRDeviceInfo)), POINTER(c_int)]
|
|
304
|
+
lib.mdrConnectionGetDevicesList.restype = MDRResult
|
|
305
|
+
lib.mdrConnectionFreeDevicesList.argtypes = [POINTER(MDRConnection), POINTER(POINTER(MDRDeviceInfo))]
|
|
306
|
+
lib.mdrConnectionFreeDevicesList.restype = MDRResult
|
|
307
|
+
lib.mdrConnectionGetLastError.argtypes = [POINTER(MDRConnection)]
|
|
308
|
+
lib.mdrConnectionGetLastError.restype = c_char_p
|
|
309
|
+
lib.mdrDebugRequestCommand.argtypes = [c_void_p, POINTER(c_uint8), c_uint32, c_uint32, MDRBoolean]
|
|
310
|
+
lib.mdrDebugRequestCommand.restype = MDRResult
|
|
311
|
+
lib.mdrDebugSetPacketCallback.argtypes = [c_void_p, MDRPacketCallback, c_void_p]
|
|
312
|
+
lib.mdrDebugSetPacketCallback.restype = None
|
|
313
|
+
lib.mdrHeadphonesCreate.argtypes = [c_uint32, POINTER(MDRConnection), MDRProtocolVersion, POINTER(c_void_p)]
|
|
314
|
+
lib.mdrHeadphonesCreate.restype = MDRResult
|
|
315
|
+
lib.mdrHeadphonesDestroy.argtypes = [c_void_p]
|
|
316
|
+
lib.mdrHeadphonesDestroy.restype = None
|
|
317
|
+
lib.mdrHeadphonesIsInitialized.argtypes = [c_void_p]
|
|
318
|
+
lib.mdrHeadphonesIsInitialized.restype = MDRBoolean
|
|
319
|
+
lib.mdrHeadphonesIsReady.argtypes = [c_void_p]
|
|
320
|
+
lib.mdrHeadphonesIsReady.restype = MDRBoolean
|
|
321
|
+
lib.mdrHeadphonesIsDirty.argtypes = [c_void_p]
|
|
322
|
+
lib.mdrHeadphonesIsDirty.restype = MDRBoolean
|
|
323
|
+
lib.mdrHeadphonesRequestInit.argtypes = [c_void_p, MDRHeadphonesInitFlags]
|
|
324
|
+
lib.mdrHeadphonesRequestInit.restype = MDRResult
|
|
325
|
+
lib.mdrHeadphonesRequestSync.argtypes = [c_void_p, MDRHeadphonesSyncFlags]
|
|
326
|
+
lib.mdrHeadphonesRequestSync.restype = MDRResult
|
|
327
|
+
lib.mdrHeadphonesGetSync.argtypes = [c_void_p, POINTER(MDRHeadphonesSyncFlags)]
|
|
328
|
+
lib.mdrHeadphonesGetSync.restype = MDRResult
|
|
329
|
+
lib.mdrHeadphonesRequestCommit.argtypes = [c_void_p]
|
|
330
|
+
lib.mdrHeadphonesRequestCommit.restype = MDRResult
|
|
331
|
+
lib.mdrHeadphonesPoll.argtypes = [c_void_p, POINTER(MDREvent)]
|
|
332
|
+
lib.mdrHeadphonesPoll.restype = MDRResult
|
|
333
|
+
lib.mdrHeadphonesSetTimeout.argtypes = [c_void_p, MDRTimeoutType, c_int]
|
|
334
|
+
lib.mdrHeadphonesSetTimeout.restype = MDRResult
|
|
335
|
+
lib.mdrHeadphonesGetFeature.argtypes = [c_void_p, MDRFeature, POINTER(MDRFeatureAvailability)]
|
|
336
|
+
lib.mdrHeadphonesGetFeature.restype = MDRResult
|
|
337
|
+
lib.mdrHeadphonesGetText.argtypes = [c_void_p, MDRText, c_uint32, c_char_p, POINTER(c_uint32)]
|
|
338
|
+
lib.mdrHeadphonesGetText.restype = MDRResult
|
|
339
|
+
lib.mdrHeadphonesGetModel.argtypes = [c_void_p, POINTER(MDRModel)]
|
|
340
|
+
lib.mdrHeadphonesGetModel.restype = MDRResult
|
|
341
|
+
lib.mdrHeadphonesGetBatteries.argtypes = [c_void_p, POINTER(MDRBattery), POINTER(c_uint32)]
|
|
342
|
+
lib.mdrHeadphonesGetBatteries.restype = MDRResult
|
|
343
|
+
lib.mdrHeadphonesGetPlayback.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRPlayback)]
|
|
344
|
+
lib.mdrHeadphonesGetPlayback.restype = MDRResult
|
|
345
|
+
lib.mdrHeadphonesSetPlaybackVolume.argtypes = [c_void_p, c_uint32]
|
|
346
|
+
lib.mdrHeadphonesSetPlaybackVolume.restype = MDRResult
|
|
347
|
+
lib.mdrHeadphonesSendPlaybackCommand.argtypes = [c_void_p, POINTER(MDRPlaybackCommand)]
|
|
348
|
+
lib.mdrHeadphonesSendPlaybackCommand.restype = MDRResult
|
|
349
|
+
lib.mdrHeadphonesGetNoiseControl.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRNoiseControl)]
|
|
350
|
+
lib.mdrHeadphonesGetNoiseControl.restype = MDRResult
|
|
351
|
+
lib.mdrHeadphonesSetNoiseControl.argtypes = [c_void_p, POINTER(MDRNoiseControl)]
|
|
352
|
+
lib.mdrHeadphonesSetNoiseControl.restype = MDRResult
|
|
353
|
+
lib.mdrHeadphonesGetSpeakToChat.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRSpeakToChat)]
|
|
354
|
+
lib.mdrHeadphonesGetSpeakToChat.restype = MDRResult
|
|
355
|
+
lib.mdrHeadphonesSetSpeakToChat.argtypes = [c_void_p, POINTER(MDRSpeakToChat)]
|
|
356
|
+
lib.mdrHeadphonesSetSpeakToChat.restype = MDRResult
|
|
357
|
+
lib.mdrHeadphonesGetListening.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRListening)]
|
|
358
|
+
lib.mdrHeadphonesGetListening.restype = MDRResult
|
|
359
|
+
lib.mdrHeadphonesSetListening.argtypes = [c_void_p, POINTER(MDRListening)]
|
|
360
|
+
lib.mdrHeadphonesSetListening.restype = MDRResult
|
|
361
|
+
lib.mdrHeadphonesGetListeningStatus.argtypes = [c_void_p, MDRListeningMode, POINTER(MDRListeningStatus)]
|
|
362
|
+
lib.mdrHeadphonesGetListeningStatus.restype = MDRResult
|
|
363
|
+
lib.mdrHeadphonesGetEqualizer.argtypes = [c_void_p, MDRPropertyType, POINTER(MDREqualizer)]
|
|
364
|
+
lib.mdrHeadphonesGetEqualizer.restype = MDRResult
|
|
365
|
+
lib.mdrHeadphonesSetEqualizerPreset.argtypes = [c_void_p, MDREqualizerPreset]
|
|
366
|
+
lib.mdrHeadphonesSetEqualizerPreset.restype = MDRResult
|
|
367
|
+
lib.mdrHeadphonesSetEqualizerClearBass.argtypes = [c_void_p, c_int32]
|
|
368
|
+
lib.mdrHeadphonesSetEqualizerClearBass.restype = MDRResult
|
|
369
|
+
lib.mdrHeadphonesSetDSEE.argtypes = [c_void_p, MDRBoolean]
|
|
370
|
+
lib.mdrHeadphonesSetDSEE.restype = MDRResult
|
|
371
|
+
lib.mdrHeadphonesGetEqualizerBands.argtypes = [c_void_p, MDRPropertyType, POINTER(c_int32), POINTER(c_uint32)]
|
|
372
|
+
lib.mdrHeadphonesGetEqualizerBands.restype = MDRResult
|
|
373
|
+
lib.mdrHeadphonesSetEqualizerBands.argtypes = [c_void_p, POINTER(c_int32), c_uint32]
|
|
374
|
+
lib.mdrHeadphonesSetEqualizerBands.restype = MDRResult
|
|
375
|
+
lib.mdrHeadphonesGetEqualizerPresets.argtypes = [c_void_p, POINTER(MDREqualizerPreset), POINTER(c_uint32)]
|
|
376
|
+
lib.mdrHeadphonesGetEqualizerPresets.restype = MDRResult
|
|
377
|
+
lib.mdrHeadphonesGetPairedDevices.argtypes = [c_void_p, POINTER(MDRPairedDevice), POINTER(c_uint32)]
|
|
378
|
+
lib.mdrHeadphonesGetPairedDevices.restype = MDRResult
|
|
379
|
+
lib.mdrHeadphonesSetPairedDevice.argtypes = [c_void_p, POINTER(MDRPairedDeviceAction)]
|
|
380
|
+
lib.mdrHeadphonesSetPairedDevice.restype = MDRResult
|
|
381
|
+
lib.mdrHeadphonesGetPairing.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRPairing)]
|
|
382
|
+
lib.mdrHeadphonesGetPairing.restype = MDRResult
|
|
383
|
+
lib.mdrHeadphonesSetPairing.argtypes = [c_void_p, POINTER(MDRPairing)]
|
|
384
|
+
lib.mdrHeadphonesSetPairing.restype = MDRResult
|
|
385
|
+
lib.mdrHeadphonesGetSourceSwitchControl.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRBoolean)]
|
|
386
|
+
lib.mdrHeadphonesGetSourceSwitchControl.restype = MDRResult
|
|
387
|
+
lib.mdrHeadphonesSetSourceSwitchControl.argtypes = [c_void_p, MDRBoolean]
|
|
388
|
+
lib.mdrHeadphonesSetSourceSwitchControl.restype = MDRResult
|
|
389
|
+
lib.mdrHeadphonesGetSourceSwitchControlResult.argtypes = [c_void_p, POINTER(MDRSourceSwitchControlResult)]
|
|
390
|
+
lib.mdrHeadphonesGetSourceSwitchControlResult.restype = MDRResult
|
|
391
|
+
lib.mdrHeadphonesSetAlertResponse.argtypes = [c_void_p, MDRAlertAction]
|
|
392
|
+
lib.mdrHeadphonesSetAlertResponse.restype = MDRResult
|
|
393
|
+
lib.mdrHeadphonesGetGeneralSettingInfo.argtypes = [c_void_p, POINTER(MDRGeneralSettingInfo), POINTER(c_uint32)]
|
|
394
|
+
lib.mdrHeadphonesGetGeneralSettingInfo.restype = MDRResult
|
|
395
|
+
lib.mdrHeadphonesGetGeneralSetting.argtypes = [c_void_p, MDRPropertyType, c_uint32, POINTER(MDRGeneralSetting)]
|
|
396
|
+
lib.mdrHeadphonesGetGeneralSetting.restype = MDRResult
|
|
397
|
+
lib.mdrHeadphonesSetGeneralSetting.argtypes = [c_void_p, POINTER(MDRGeneralSetting)]
|
|
398
|
+
lib.mdrHeadphonesSetGeneralSetting.restype = MDRResult
|
|
399
|
+
lib.mdrHeadphonesGetAssignableControls.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRAssignableControl), POINTER(c_uint32)]
|
|
400
|
+
lib.mdrHeadphonesGetAssignableControls.restype = MDRResult
|
|
401
|
+
lib.mdrHeadphonesGetAssignableControlActions.argtypes = [c_void_p, MDRAssignableActionKeyLocation, POINTER(MDRAssignableAction), POINTER(c_uint32)]
|
|
402
|
+
lib.mdrHeadphonesGetAssignableControlActions.restype = MDRResult
|
|
403
|
+
lib.mdrHeadphonesSetAssignableControls.argtypes = [c_void_p, POINTER(MDRAssignableControl), c_uint32]
|
|
404
|
+
lib.mdrHeadphonesSetAssignableControls.restype = MDRResult
|
|
405
|
+
lib.mdrHeadphonesGetPower.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRPower)]
|
|
406
|
+
lib.mdrHeadphonesGetPower.restype = MDRResult
|
|
407
|
+
lib.mdrHeadphonesSetPower.argtypes = [c_void_p, POINTER(MDRPower)]
|
|
408
|
+
lib.mdrHeadphonesSetPower.restype = MDRResult
|
|
409
|
+
lib.mdrHeadphonesGetVoiceGuidance.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRVoiceGuidance)]
|
|
410
|
+
lib.mdrHeadphonesGetVoiceGuidance.restype = MDRResult
|
|
411
|
+
lib.mdrHeadphonesSetVoiceGuidance.argtypes = [c_void_p, POINTER(MDRVoiceGuidance)]
|
|
412
|
+
lib.mdrHeadphonesSetVoiceGuidance.restype = MDRResult
|
|
413
|
+
lib.mdrHeadphonesGetVoiceAssistant.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRVoiceAssistantSettings)]
|
|
414
|
+
lib.mdrHeadphonesGetVoiceAssistant.restype = MDRResult
|
|
415
|
+
lib.mdrHeadphonesGetVoiceAssistantOptions.argtypes = [c_void_p, POINTER(MDRVoiceAssistantOption), POINTER(c_uint32)]
|
|
416
|
+
lib.mdrHeadphonesGetVoiceAssistantOptions.restype = MDRResult
|
|
417
|
+
lib.mdrHeadphonesSetVoiceAssistant.argtypes = [c_void_p, MDRVoiceAssistant]
|
|
418
|
+
lib.mdrHeadphonesSetVoiceAssistant.restype = MDRResult
|
|
419
|
+
lib.mdrHeadphonesGetConnectionMode.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRConnectionMode)]
|
|
420
|
+
lib.mdrHeadphonesGetConnectionMode.restype = MDRResult
|
|
421
|
+
lib.mdrHeadphonesSetConnectionMode.argtypes = [c_void_p, POINTER(MDRConnectionMode)]
|
|
422
|
+
lib.mdrHeadphonesSetConnectionMode.restype = MDRResult
|
|
423
|
+
lib.mdrHeadphonesGetSafeListening.argtypes = [c_void_p, MDRPropertyType, POINTER(MDRSafeListening)]
|
|
424
|
+
lib.mdrHeadphonesGetSafeListening.restype = MDRResult
|
|
425
|
+
lib.mdrHeadphonesSetSafeListening.argtypes = [c_void_p, POINTER(MDRSafeListening)]
|
|
426
|
+
lib.mdrHeadphonesSetSafeListening.restype = MDRResult
|
|
427
|
+
lib.mdrHeadphonesGetWearingStatus.argtypes = [c_void_p, POINTER(MDRWearingStatus)]
|
|
428
|
+
lib.mdrHeadphonesGetWearingStatus.restype = MDRResult
|