USB shield and Arduino UNO - MIDI controller via USB

I am integrating a USB shield and an Arduino UNO. End goal = Control a MIDI device via USB. This is what I have done. I ran the “board_qc” sketch and if I connect an USB thumbdrive the tests all pass. But when I connect a MIDI device and run the following sketch …
It fails at this step - " if( Usb.getUsbTaskState() == USB_STATE_RUNNING )"… any thoughts on how I can find what is wrong and get this working.

Can you say what USB shield you have, there are several, please post a link to it.
Also can you link or post what software you are using along with any links to libraries used.

Mike,
The code is here - USB shield and Arduino UNO - MIDI controller via USB · Issue #14 · YuuichiAkagawa/USBH_MIDI · GitHub
The libraries I am using are - usb.h, usbhub.h & usbh_midi.h
The USB shield that I am using is this - http://www.bhashatech.com/breakout-boards/103-usb-host-google-adk-adapter.html
I am at my wits end and any help, would be appreciated more than I can express.
PS: It seems to be failing at " if( Usb.getUsbTaskState() == USB_STATE_RUNNING )" and when I do a Serial.println (Usb.getUsbTaskState()); I got 160… don’t know what that is supposed to mean. I looked at usb.cpp but am so dazed at the moment, cant seem to figure out where I am getting that value from.

Mike,
Never mind..
I changed the USB host shield and now it works...
Thanks for the help provided.
Regards,
Lawrence

Sorry I could not be more help but it was a different USB shield I had, and I couldn't find the code. That link was just to your bug report.

Mike…
Glad we could cross each others path because of this issue…

Regards,
Lawrence