From 5e14a17287220d7384ba6800f93414a7636cce20 Mon Sep 17 00:00:00 2001 From: Russell Gallop Date: Tue, 23 Aug 2011 17:38:02 +0100 Subject: [PATCH] Handle other cases of tail length that come up. --- module_usb_aud_shared/usb_buffer/usb_buffer.xc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/module_usb_aud_shared/usb_buffer/usb_buffer.xc b/module_usb_aud_shared/usb_buffer/usb_buffer.xc index 0e09c4eb..d7d077d6 100644 --- a/module_usb_aud_shared/usb_buffer/usb_buffer.xc +++ b/module_usb_aud_shared/usb_buffer/usb_buffer.xc @@ -564,14 +564,22 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, chanend c_aud datalength = p - p0;// - 4; switch (tail) { - case 13: - // the tail is 3 which means - datalength -= 3; - break; // case 10: // // the tail is 0 which means // datalength -= 6; // break; + case 11: + // the tail is 1 which means + datalength -= 5; + break; + case 12: + // the tail is 1 which means + datalength -= 4; + break; + case 13: + // the tail is 3 which means + datalength -= 3; + break; default: // Case not handled before printstrln("Tail case not handled (tail, datalength)");