Multichannel USB audio in Android M

536 views
Skip to first unread message

Felix Homann

unread,
May 29, 2015, 2:09:28 AM5/29/15
to andro...@googlegroups.com
Hi,

I'm quite excited about the a) NDK support arriving in Adnroid Studio and b) the announcement of multichannel USB audio in Android M. I have already downloaded the Android M Preview SDK and documentation but failed to find any information on multichannel audio. Could someone (*) please give me a hint if there already is something and where to find it in that case?

Thanks,
Felix

(*) here "someone" most probably means Glenn ;-)

Glenn Kasten

unread,
May 29, 2015, 12:05:18 PM5/29/15
to andro...@googlegroups.com, showlabor....@gmail.com
First, the good news: yes as mentioned at http://developer.android.com/preview/api-overview.html#audio
there is improved support for configuring audio in M preview SDK, such as multichannel.
Most of M preview SDK documentation is online, 
but the API reference must downloaded from http://developer.android.com/preview/download.html#docs
After installing the docs, open these files in your browser: 
m-preview-1-developer-docs/reference/android/media/AudioTrack.Builder.html
m-preview-1-developer-docs/reference/android/media/AudioRecord.Builder.html
m-preview-1-developer-docs/reference/android/media/AudioFormat.Builder.html
The key change that permits better configuration of multichannel I/O over USB
is the concept of "indexed multi-channel" in addition to the previous "positional multi-channel" concept.
Positional multichannel associates each channel with a location or semantics,
such as front left, front rear, etc.
Indexed multichannel gives no semantics to each channel.
Rather each channel is identified by an index (number).
For example a 4-channel USB audio peripheral would have indices 0 to 3.
Indexed fits with USB audio much better than positional (which fits better with HDMI).

Now, the bad news:  the indexed multi-channel is currently only for SDK, not NDK.
I can't make any commitments or give a schedule.

Felix Homann

unread,
May 29, 2015, 12:26:22 PM5/29/15
to andro...@googlegroups.com, showlabor....@gmail.com
Thank you very much, Glenn!
(I try focus on the good news and forget about the *very* bad news at the end... )

Olivier Roblin

unread,
Oct 14, 2015, 9:57:38 AM10/14/15
to android-ndk, showlabor....@gmail.com
Hi all,
Any update concerning this "bad news" ? Is multichannel audio still not available from ndk ? Still no schedule for this ?
(Multichannel audio is an advanced audio feature that concerns advanced audio apps, that all use native OpenSL....Such a feature is not really useable if only available for Java API.)

Glenn Kasten

unread,
Oct 15, 2015, 11:25:09 AM10/15/15
to android-ndk, showlabor....@gmail.com
The process to see the SDK documentation that I posted earlier is obsolete.
The documentation is now online at these URLs:
  https://developer.android.com/reference/android/media/AudioFormat.Builder.html

There is no change for NDK since the May 29 post.
I am tracking your request, but I can't promise any commitment or schedule
for either explicit routing control or indexed multi-channel in NDK APIs.

In the mean time, traditional positional multi-channel I/O over USB
(where the channels have names and semantics such as "left" and "right")
is available for some USB peripherals such as Alesis iO4 with automatic routing.
Reply all
Reply to author
Forward
0 new messages