Based on what others have said in the comments and some research I have done, here are my suggestions.
HARK-KINCET should do the job, though it does require installation. There is a possibility you could bundle installation in your game, though you will probably require permission from the developers. [Based on Theraot's answer]
The other option presented here is using the libraries here and code a program that connects to those libraries. [Based on McLovin's answer]
A solution that will only work for you would be to use the code posted here and then set that up in your kernel. You may want to check what the site said about some microphones having a bug that prevents full setup; if so use this setup command:
sudo kinect_upload_fw /lib/firmware/kinect/UACFirmware.C9C6E852_35A3_41DC_A57D_BDDEB43DFD04
If you have this bug, you will get this error:
libusbx: error [op_set_configuration] failed, error -1 errno 110
About to send: 09 20 02 06 01 00 00 00 60 00 00 00 00 00 00 00 15 00 00 00 00 00 00 00
libusbx: error [submit_bulk_transfer] submiturb failed error -1 errno=2
Error: res: -1 transferred: 0 (expected 24)
From what I have read, this is probably the problem you are having. You can fix it by downloading the source and editing it, then fetching the firmware.
cd ~/Downloads
wget https://launchpad.net/ubuntu/+archive/primary/+files/kinect-audio-
setup_0.3.orig.tar.gz
From here you should follow the steps presented in the link, as my explanations may get slightly confusing. If you wish to continue with my explanation, edit the file called “kinect_upload_fw.c” so that it reads as:
index b2188d6..e3b72db 100644 (file)
b/kinect_upload_fw/kinect_upload_fw.c
@@ -155,9 +155,19 @@ int main(int argc, char** argv) {
goto fail_libusb_open;
}
int current_configuration = 0;
libusb_get_configuration(dev, ¤t_configuration);
if (current_configuration != 1)
libusb_set_configuration(dev, 1);
libusb_claim_interface(dev, 0);
libusb_get_configuration(dev, ¤t_configuration);
if (current_configuration != 1) {
res = -ENODEV;
goto cleanup;
}
seq = 1;
bootloader_command cmd;
Save the changes and then build and install it. This should fix the problem.