Error when ringbuffer size isn't a multiple of bytes/sample
Posted: Wed Sep 07, 2011 4:31 pm
I'm getting a strange bug when using the Labview_DLL.dll in my C++ program. I setup my program according to the instructions http://www.biosemi.com/faq/make_own_acq ... ftware.htm, and I'm using the Labview_DLL.dll obtained from the current download of the "USB driver Windows (32bit)" from http://www.biosemi.com/download.htm, as directed in this previous discussion: viewtopic.php?t=600.
When I use the recommended ringbuffer size of 2^25=33554432, and speed mode 4 on an Mk2 box, I get erroneous data in some of the (for me unused) EEG channels and all of the EX channels every 29747 samples. However, data continues to be collected without error, and the synchronization word is always present, exactly where it is expected.
If, instead, I make the ringbuffer size a multiple of the number of bytes per sample, this problem goes away. That is, with speed mode 4 I need to use n*282*4, with speed mode 5 I need to use m*154*4, etc, where n or m are some large number such that the ringbuffer size is close to 2^25. I didn't see this problem mentioned in any of the documentation on how to use the Labview_DLL.dll, nor in the forums, though I may have overlooked it. I believe this to be a bug in the Labview_DLL.dll, and just wanted to share my experience so that other users may avoid this problem in the future.
When I use the recommended ringbuffer size of 2^25=33554432, and speed mode 4 on an Mk2 box, I get erroneous data in some of the (for me unused) EEG channels and all of the EX channels every 29747 samples. However, data continues to be collected without error, and the synchronization word is always present, exactly where it is expected.
If, instead, I make the ringbuffer size a multiple of the number of bytes per sample, this problem goes away. That is, with speed mode 4 I need to use n*282*4, with speed mode 5 I need to use m*154*4, etc, where n or m are some large number such that the ringbuffer size is close to 2^25. I didn't see this problem mentioned in any of the documentation on how to use the Labview_DLL.dll, nor in the forums, though I may have overlooked it. I believe this to be a bug in the Labview_DLL.dll, and just wanted to share my experience so that other users may avoid this problem in the future.