Skip to content

Commit

Permalink
Fixes "subpacket too large", "not all subsequences received" and LIBU…
Browse files Browse the repository at this point in the history
…SB_ERROR_OTHER errors for OS X
  • Loading branch information
fran6co committed Oct 21, 2015
1 parent caf7d86 commit 854c3b2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/libfreenect2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@
#include <libfreenect2/protocol/command_transaction.h>
#include <libfreenect2/logging.h>

#if defined(__APPLE__)
#define PKTS_PER_XFER 136
#define NUM_XFERS 4
#else
#define PKTS_PER_XFER 8
#define NUM_XFERS 60
#endif

namespace libfreenect2
{
using namespace libfreenect2;
Expand Down Expand Up @@ -464,8 +472,8 @@ bool Freenect2DeviceImpl::open()
return false;
}

rgb_transfer_pool_.allocate(50, 0x4000);
ir_transfer_pool_.allocate(80, 8, max_iso_packet_size);
rgb_transfer_pool_.allocate(20, 0x4000);
ir_transfer_pool_.allocate(NUM_XFERS, PKTS_PER_XFER, max_iso_packet_size);

state_ = Open;

Expand Down Expand Up @@ -585,7 +593,7 @@ void Freenect2DeviceImpl::start()

LOG_INFO << "submitting usb transfers...";
rgb_transfer_pool_.submit(20);
ir_transfer_pool_.submit(60);
ir_transfer_pool_.submit(NUM_XFERS);

state_ = Streaming;
LOG_INFO << "started";
Expand Down

0 comments on commit 854c3b2

Please sign in to comment.