Aaudio doesn't build

295 views
Skip to first unread message

u

unread,
Jan 8, 2021, 3:18:11 PM1/8/21
to android-ndk
Hello,

Although I added the directive #include <aaudio/AAudio.h> and added aaudio in CMakeLists.txt file in target_link_libraries section, my program doesn't compile for some reason.

What can I do to find source of the problem? I think I did everything right.

Some error messages:
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
error: undefined reference to 'AAudio_createStreamBuilder'
error: undefined reference to 'AAudioStreamBuilder_setPerformanceMode'
....

Dan Albert

unread,
Jan 8, 2021, 3:21:56 PM1/8/21
to android-ndk
Probably using too low a minSdkVersion for those APIs?

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/d366390e-b466-454c-adea-cf6aa0796743n%40googlegroups.com.

phil...@google.com

unread,
Jan 8, 2021, 4:02:59 PM1/8/21
to android-ndk
I agree with Dan. AAudio first appeared in Android O, API 26.

Instead of using AAudio directly, we strongly recommend using Oboe instead.
Oboe uses AAudio on API 27 and later, and uses OpenSL ES on earlier versions.
(AAudio on API 26 is not stable.)
Oboe also has multiple workarounds for problems on various devices and Android versions.
And it can help you get better latency.

Phil Burk

u

unread,
Jan 8, 2021, 6:31:02 PM1/8/21
to andro...@googlegroups.com
MinSDKVersion is 22. Is it too low?

u

unread,
Jan 8, 2021, 6:31:02 PM1/8/21
to andro...@googlegroups.com
Yes, that was the case, thank you.
Reply all
Reply to author
Forward
0 new messages