Forum Xamarin.Android

AAudio c# wrapper

trampstertrampster Member ✭✭
edited March 31 in Xamarin.Android

Does anyone know of a wrapper for AAudio?

I havn't been able to find one and am considering writing a wrapper for my needs. I have experience in writing c# wrappers for native code with PInvoke. OpenSSL and Opus most recently.

However to create a wrapper I need the name of the AAudio native assembly. I havn't been able to find this either.

Best Answer

  • trampstertrampster ✭✭
    edited March 31 Accepted Answer

    Thanks Javan,

    I already know about native libraries and how to include them in Xamarin.Android apps. I'm already using openssl and opus this way. But AAudio is different because its part of the NDK. This lead me to wonder if it I actually needed to include libaaudio.so in my project and therefore deploy it to the device, or if being part of the NDK would mean it was already on the target device.

    Having just spent some time wrapping some methods from AAudio and testing it, it does appear to work without me needing to include libaaudio.so myself.

Answers

  • trampstertrampster Member ✭✭

    I've found that the android ndk has libaaudio.so for all different architectures, Do I need to deploy these with my app, or will it already be on target?

  • JarvanJarvan Member, Xamarin Team Xamurai

    AAudio is from the native library, to use native library in Xamarin.Android. Please check the following tutorial:
    https://docs.microsoft.com/en-us/xamarin/android/platform/native-libraries

  • trampstertrampster Member ✭✭
    edited March 31 Accepted Answer

    Thanks Javan,

    I already know about native libraries and how to include them in Xamarin.Android apps. I'm already using openssl and opus this way. But AAudio is different because its part of the NDK. This lead me to wonder if it I actually needed to include libaaudio.so in my project and therefore deploy it to the device, or if being part of the NDK would mean it was already on the target device.

    Having just spent some time wrapping some methods from AAudio and testing it, it does appear to work without me needing to include libaaudio.so myself.

Sign In or Register to comment.