How do I set the usb audio code up for usb asynchronous transfers.
Do I just have to change bmAttributes
USB_ENDPOINT_TYPE_ISOCHRONOUS,
to
USB_ENDPOINT_SYNC_ASYNCHRONOUS
or is it more complexed than that.
I think I got the answer anyway don't want to ruin this thread maybe you should delete the last couple of posts
use a ringbuffer and read and write in opposite directions. DMA can only do one direction AFAIK (counting up) so you need to write a buffer in reverse direction in software and let the DMA do the playback part. You can use two buffers and switch them on the 'end-of-DMA' interrupt for example. You can also use a simple ticker interrupt and read and write a ringbuffer on each 'tick', again with opposite directions.