Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to open device in non-exclusive mode #131

Closed
DaPutzy opened this issue Nov 18, 2022 · 1 comment · Fixed by #132
Closed

Option to open device in non-exclusive mode #131

DaPutzy opened this issue Nov 18, 2022 · 1 comment · Fixed by #132

Comments

@DaPutzy
Copy link
Contributor

DaPutzy commented Nov 18, 2022

I use this library to read metrics (battery level, etc.) from my wireless headset (HyperX Cloud Flight) on macOS (12.6) using this build.
However while reading data i can no longer control the volume via headset since the library uses the device exclusively.

As far as i understand from this issue there is a way to use a device non exclusively under macOS, so that I could read data and still get system volume events. This would be a great addition to this library!

@DaPutzy
Copy link
Contributor Author

DaPutzy commented Nov 18, 2022

I just hacked this together locally and it works great!
I used my local libhidapi.0.12.0.dylib

which contains:

00000000000034ec T _hid_close
0000000000003650 T _hid_darwin_get_location_id
00000000000036f0 T _hid_darwin_get_open_exclusive
0000000000003704 T _hid_darwin_is_device_open_exclusive
0000000000002818 T _hid_darwin_set_open_exclusive
0000000000002868 T _hid_enumerate
0000000000003720 T _hid_error
000000000000282c T _hid_exit
0000000000002be8 T _hid_free_enumeration
000000000000345c T _hid_get_feature_report
0000000000003648 T _hid_get_indexed_string
00000000000034dc T _hid_get_input_report
0000000000003600 T _hid_get_manufacturer_string
0000000000003618 T _hid_get_product_string
0000000000003630 T _hid_get_serial_number_string
0000000000002774 T _hid_init
0000000000002c3c T _hid_open
0000000000002cd8 T _hid_open_path
0000000000003428 T _hid_read
0000000000003248 T _hid_read_timeout
000000000000344c T _hid_send_feature_report
0000000000003438 T _hid_set_nonblocking
000000000000275c T _hid_version
0000000000002768 T _hid_version_str
00000000000031d4 T _hid_write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant