|
From: Tim R. <ti...@pr...> - 2016-03-18 22:30:49
|
Matías Araujo wrote:
> Because I'm working on Android and the system audio APIs don't have the
> speed and flexivility that I need also I don't have plans to move my
> application to a system with a PCI-baed audio device.
Ah, I've heard that before. There are so many people doing audio on
Android, I would have thought this issue would have been addressed by
now. Libusb is just the wrong solution for audio work.
> This is all I wanted to know. My doubt was if the library was ordering the
> bytes in a particular way.
The library doesn't actually touch the memory. It is delivered to you
exactly as it was sent from the device. The format of the buffer is
given in the USB Audio Class specification. 16-bit PCM is stored little
endian, so the bytes in order are:
left-lo-byte left-hi-byte right-lo-byte right-hi-byte
left-lo-byte etc.
So if you happen to be running on a big-endian processor, you'll need to
byte swap the samples.
> Thanks Tim for your reply. I'm Sorry if I asked something pretty obvious.
Well, I'm sorry for being grumpy.
--
Tim Roberts, ti...@pr...
Providenza & Boekelheide, Inc.
|