diff options
Diffstat (limited to 'multio/multio.c')
-rwxr-xr-x | multio/multio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/multio/multio.c b/multio/multio.c index 65c1ac5..9238974 100755 --- a/multio/multio.c +++ b/multio/multio.c @@ -9,9 +9,9 @@ output is a list of 2 floats (channel, value) */ -#ifdef NT
-#include <windows.h>
-#endif +#ifdef _WIN32 +#include <windows.h> +#endif /* _WIN32 */ #include "m_pd.h" #include "usb.h" @@ -73,7 +73,7 @@ static void *usb_read_thread(void *w) bytesread = usb_interrupt_read(x->d, 0x81, buffer, 8, 1000); if(bytesread > 0) { - if(x->buf_count[mybuf]+bytesread > MAXBUF)
+ if(x->buf_count[mybuf]+bytesread > MAXBUF) x->buf_count[mybuf] = 0; x->double_buffer[mybuf][x->buf_count[mybuf]++] = bytesread; // store the number of bytes for that message for(cnt = 0; cnt < bytesread; cnt++) // append the message data into the buffer @@ -83,9 +83,9 @@ static void *usb_read_thread(void *w) // post("thread read %i bytes to buffer %i (now %i bytes)",bytesread, mybuf,x->buf_count[mybuf] ); } } -#ifdef NT
+#ifdef _WIN32 Sleep(1); -#endif +#endif /* _WIN32 */ } } |