Rafał Kanus
2015-09-29 10:14:08 UTC
Welcome everybody,
I am new on this group and this is my first topic.
We are working on Voip application which is mostly implemented in c/c++ to
be multi-platform.
On Android we are using OpenSL ES API to access audio devices.
We don't have problems with Earpiece, Speaker, Bluetooth Headset or Wired
Headset devices.
We are able to detect which device is connected and in use using
AudioManager from Java.
We are also able to switch devices.
Based on that information we open devices in appropriate configuration
(sample rate, channels etc).
But how to deal with USB Audio devices?
Android 5 have official support for them.
In the documentation https://source.android.com/devices/audio/usb.html we
can read that system automatically routes audio playback and capture
appropriately, based on the audio policy rules.
How to detect if USB Audio device is connected and audio is routed through
it?
I know that the system route audio automatically to USB but It would be
good to know about that and open the device in correct configuration e.g.
stereo instead mono.
Did someone had the same problems?
BTW: Nexus devices are working correctly with USB Audio devices but Samsung
do not route audio via USB when mode is set to IN_COMMUNICATION. That seems
to be broken.
Best regards,
Rafal Kanus
I am new on this group and this is my first topic.
We are working on Voip application which is mostly implemented in c/c++ to
be multi-platform.
On Android we are using OpenSL ES API to access audio devices.
We don't have problems with Earpiece, Speaker, Bluetooth Headset or Wired
Headset devices.
We are able to detect which device is connected and in use using
AudioManager from Java.
We are also able to switch devices.
Based on that information we open devices in appropriate configuration
(sample rate, channels etc).
But how to deal with USB Audio devices?
Android 5 have official support for them.
In the documentation https://source.android.com/devices/audio/usb.html we
can read that system automatically routes audio playback and capture
appropriately, based on the audio policy rules.
How to detect if USB Audio device is connected and audio is routed through
it?
I know that the system route audio automatically to USB but It would be
good to know about that and open the device in correct configuration e.g.
stereo instead mono.
Did someone had the same problems?
BTW: Nexus devices are working correctly with USB Audio devices but Samsung
do not route audio via USB when mode is set to IN_COMMUNICATION. That seems
to be broken.
Best regards,
Rafal Kanus
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at http://groups.google.com/group/android-ndk.
For more options, visit https://groups.google.com/d/optout.