2

I am trying to compile the LiveEffects sample app in Google's oboe library: https://github.com/google/oboe/tree/master/samples/LiveEffect

I have downloaded the entire Oboe project and keeping it's folder structure intact I have loaded the project in the oboe-master/samples/LiveEffect folder in Android Studio

I have not made any changes but the Device List drop down box in Android Studio as well as the compile and run button (green triangle) are disabled, and clicking on gradle sync gives an error NDK not configured, when NDK is already installed and I can compile other NDK projects on this computer.

What do I need to do to get the Oboe sample code (without any changes) compiled?

user13267
  • 6,871
  • 28
  • 80
  • 138
  • can this help?https://stackoverflow.com/a/46447633/6997819 – Vir Rajpurohit Feb 21 '20 at 05:31
  • @Vir no that is not the problem in my project – user13267 Feb 21 '20 at 05:50
  • 1
    Follow the instructions: https://github.com/google/oboe/tree/master/samples LiveEffect needs the 'audio-device' module built so all of 'samples' is one Android Project with multiple apps. – Morrison Chang Feb 21 '20 at 06:04
  • @MorrisonChang thanks it's working. One question, for NDK based audio transfers is AAudio the newer one or is it OpenSL ES? The reason I wanted to try out this app was because I wanted force my app to use phone's built in mic when an external hadphone mic was connected. In this app, if I select AAudio this works, but if I select OpenSL ES it always defaults to headphone's external mic. I thought it was advised to move away from AAudio towards OpenSL ES isn't? – user13267 Feb 21 '20 at 06:32
  • To my knowledge AAudio is newer than OpenSL ES. Oboe is supposed to wrap both as a compatibility layer. – Morrison Chang Feb 21 '20 at 06:53
  • @MorrisonChang Thanks I see from googling that it is indeed only available starting from Android 8. The AAudio option is in fact disabled by default in the Samsung Galaxy S6 (Android 7) test phone and only available in Samsung Galaxy S7 test phone (with OS updated to Android 8) – user13267 Feb 21 '20 at 06:56
  • @MorrisonChang I have one more question if you don't mind. In the NDK audio-echo sample program by google (https://github.com/android/ndk-samples/tree/master/audio-echo) which uses OpenSL ES, is it possible to force the app to always use built in microphone even when headset with mic is connected? Or is this feature not possible in OpenSL ES? Do you have any ideas about this? – user13267 Feb 21 '20 at 06:58

1 Answers1

2

After you have cloned the Oboe repository you need to:

  • Open Android Studio
  • File -> Open -> locate the samples directory -> Open

This should automatically import all the Oboe samples. You can then choose LiveEffect from the Run Configuration menu at the top:

Android Studio Run Configuration drop down

donturner
  • 17,867
  • 8
  • 59
  • 81