Fixing the download of many samples.
authorviric <viriketo@gmail.com>
Sun, 24 Oct 2010 20:17:35 +0200
changeset 11 0a821b9bdc80
parent 10 fc8a8cfe680a
child 12 faac84f37171
Fixing the download of many samples.
pce.c
--- a/pce.c	Sun Oct 24 19:24:00 2010 +0200
+++ b/pce.c	Sun Oct 24 20:17:35 2010 +0200
@@ -205,12 +205,13 @@
         parse_data(data);
 
         int sec = 0;
+        int block = 0;
         do
         {
             char frame[3];
             int step_frames = num_frames >= 0x40 ? 0x40 : num_frames;
             frame[0] = 0;
-            frame[1] = 0;
+            frame[1] = block;
             frame[2] = step_frames;
 
             res = usb_bulk_write(handle, ep_out, frame, 3, 1000);
@@ -239,6 +240,7 @@
                 num -= 64;
                 num_frames -= 1;
             }
+            ++block;
         }
         while(num_frames > 0);
     }