Is there a way to efficiently get the bytes from a ByteArray?
I'm working on an app that handles a data stream from an USB device. The ByteArray.Get() method takes between 10 and 60ms while it only takes 1ms to transfer the same amount of bytes throw USB.
A Buffer.BlockCopy() for the same amount of memory takes less than 0.1ms.
I already tried using ByteArray.Wrap() but the pre-allocated byte is not updated.
I was previously using UsbConnection.BulkTransfer() for the synchronous USB transfer but wasn't achieving the required performance. Now I'm using the asynchronous UsbRequest.Queue() and getting a much better performance. Unfortunately it doesn't handle byte directly and ByteArray.Get() performance is awful...