[openal] uwp, android

doug sanden highaspirations at hotmail.com
Sat Nov 26 10:11:09 EST 2016


> but I haven't tried linking and running the android app yet.
Didn't run. And the .vcxproj file looked a bit verbose, with custom build rules.

So in VisualStudio 2015 I generated new (stub) projects for openAL, common (and freeALUT).
Then opening the .vcxproj files generated a) from cmakeMS and b) from visual studio, I copied and pasted a few things like
a) list of files to compile
b) paths to include
c) compiler preprocessor definitions (taking out any junk unneeded)

I built these as static libs - so linking perculated up to the main NativeActivity app
- and added project references to the new openal, common (and freealut) projects
Then it didn't build - unsatisfied references from sles and alc

I added to the native app's linker > input > dependencies OpenSLES
And opened the app's native activity .vcprojx and moved the reference to the common project after the openal project.

Then it linked, ran and I heard sound from the android phone. Done. 
thank you for your help.
-Doug

________________________________________
From: openal <openal-bounces at openal.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: November 24, 2016 3:20 PM
To: openal mailing list
Subject: Re: [openal] uwp, android

> https://blogs.msdn.microsoft.com/vcblog/2015/12/15/support-for-android-cmake-projects-in-visual-studio/
- I was able to use this process to build openAL for android in visual studio 2015 with a few tweaks:
1. make sure I'm using the right (MS) cmake in the final command (temporarily copied the .exe to cmakeMS.exe)
2. run the final cmake from visual studio x64 ARM console window - which has various paths to clang and apparently also to android NDK
- then I used the original CMakeLists.txt (no hacking, no XCompile*)
- and it didn't find windows.h (that's good)
- and it did find SLES/*  (that's good)
- and it did find pthreads (that's good)
"""
-- Building OpenAL with support for the following backends:
--      OpenSL, WaveFile, Null
-- Building with support for CPU extensions:
--     Default, Neon
"""
- and the .sln/ .vcprojx built the openAL lib for kitkat/android-19
-- (VS it still needs that MS cmake for building, so keep a copy named cmake)
but I haven't tried linking and running the android app yet.

________________________________________
From: openal <openal-bounces at openal.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: November 24, 2016 10:46 AM
To: openal mailing list
Subject: Re: [openal] uwp, android

> Q1. is openSL ES  sufficient for openAL-Soft ?
YES.
...
CMakeLists.txt L.1080
# Check for OpenSL (Android) backend
OPTION(ALSOFT_REQUIRE_OPENSL "Require OpenSL backend" OFF)
CHECK_INCLUDE_FILES("SLES/OpenSLES.h;SLES/OpenSLES_Android.h" HAVE_SLES_OPENSLES_ANDROID_H)

...
I confirmed I can include SLES/* headers in my VS2015 android NDK project main.c.
So its a matter of getting cmake to do what I need for cross compiling on windows for android.
https://blogs.msdn.microsoft.com/vcblog/2015/12/15/support-for-android-cmake-projects-in-visual-studio/
- has some hints


> Q2. is there an openSL or openSL ES wrapper for uwp / xaudio2?
NO.
I'll continue to use an xaudio2 based emulator for openal.

-Doug
________________________________________
From: openal <openal-bounces at openal.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: November 24, 2016 7:58 AM
To: openal at openal.org
Subject: Re: [openal] uwp, android

Maybe better questions:
Q1. is openSL ES  sufficient for openAL-Soft ?
I see Android has an openSL ES API
https://developer.android.com/ndk/guides/audio/opensl-for-android.html
Q2. is there an openSL or openSL ES wrapper for uwp / xaudio2?

________________________________________
From: openal <openal-bounces at openal.org> on behalf of doug sanden <highaspirations at hotmail.com>
Sent: November 24, 2016 7:13 AM
To: openal at openal.org
Subject: [openal] uwp, android

I'm from freewrl.sf.net - virtual reality browser that uses openAL-soft to implement web3d.org Sound node for windows and linux desktop.
I'm working on windows uwp and android for a few days.

uwp (universal windows platform) / winRT / windows-metro
- I worked on this before and got something working.
- Now I'm implementing movietexture node via ffmpeg libs, and just realized I have an old openAL-soft interface that doesn't have float32
- it looks like I hacked the openAL code before - so it goes directly to Xaudio2 - works with .wav and mpeg1 audio, but not for mp4 audio even after a hand-coded conversion to 16bit - an xaudio function returns error
I'll upgrade that interface to try float32.
Q. has someone done a proper implementation for uwp?

android
- haven't attempted yet. I'm working through visual studio 2015 NDK build process.
Q. any tips / example android ndk implementation?

Thanks,
Doug

_______________________________________________
openal mailing list
openal at openal.org
http://openal.org/mailman/listinfo/openal
_______________________________________________
openal mailing list
openal at openal.org
http://openal.org/mailman/listinfo/openal
_______________________________________________
openal mailing list
openal at openal.org
http://openal.org/mailman/listinfo/openal
_______________________________________________
openal mailing list
openal at openal.org
http://openal.org/mailman/listinfo/openal


More information about the openal mailing list