Skip to content

Commit

Permalink
usb: Use less transfers for multi-Kinect setup
Browse files Browse the repository at this point in the history
Windows can only poll() 64 fds at once.
  • Loading branch information
xlz committed Mar 10, 2016
1 parent f5b0b1b commit df8058a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libfreenect2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,15 @@ bool Freenect2DeviceImpl::open()
unsigned ir_pkts_per_xfer = 8;
unsigned ir_num_xfers = 60;

#ifdef __APPLE__
#if defined(__APPLE__)
ir_pkts_per_xfer = 128;
ir_num_xfers = 4;
#elif defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
// For multi-Kinect setup, there is a 64 fd limit on poll().
rgb_xfer_size = 1048576;
rgb_num_xfers = 3;
ir_pkts_per_xfer = 64;
ir_num_xfers = 8;
#endif

const char *xfer_str;
Expand Down

0 comments on commit df8058a

Please sign in to comment.