Android Audio

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.

Re: Android Audio

Postby LunaRebirth » Fri Oct 20, 2017 9:48 pm

CuteAlien wrote:Did you try printing defaultDeviceName to see which value it has?


"Android Default"
LunaRebirth
 
Posts: 301
Joined: Sun May 11, 2014 12:13 am

Re: Android Audio

Postby CuteAlien » Sat Oct 21, 2017 12:47 am

Looks also correct. And if alcGetString returns correct string it's hard to see how library could not be linked correct. Except if it maybe implements that part in header or so.

I looked over your Android.mk and it seems still to be somewhat different to mine. Not sure if it matters. For example you don't seem to have openal in LOCAL_SHARED_LIBRARIES.

And I also got those lines:
cpp Code: Select all
 
include $(CLEAR_VARS)
LOCAL_MODULE := openal
LOCAL_SRC_FILES := ../libs/openal/android/lib/$(TARGET_ARCH_ABI)/libopenal.so
include $(PREBUILT_SHARED_LIBRARY)
 
include $(CLEAR_VARS)
LOCAL_MODULE := freealut
LOCAL_SRC_FILES := ../libs/freealut/android/lib/$(TARGET_ARCH_ABI)/libfreealut.so
include $(PREBUILT_SHARED_LIBRARY)
 


So maybe compare to my Android.mk and look for all stuff that mentions "openal" and "freealut" once more.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8365
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Android Audio

Postby LunaRebirth » Sat Oct 21, 2017 2:59 am

I copied your Android.mk and removed everything except what I need for Irrlicht and OpenAL. No change in result.

cpp Code: Select all
LOCAL_PATH := $(call my-dir)/..
IRRLICHT_PROJECT_PATH := $(LOCAL_PATH)
 
include $(CLEAR_VARS)
LOCAL_MODULE := Irrlicht
LOCAL_SRC_FILES := $(IRRLICHT_PROJECT_PATH)/../../lib/Android/libIrrlicht.a
include $(PREBUILT_STATIC_LIBRARY)
 
include $(CLEAR_VARS)
LOCAL_MODULE := openal
LOCAL_SRC_FILES := libs/openal-soft-master/obj/local/$(TARGET_ARCH_ABI)/libopenal.so
include $(PREBUILT_SHARED_LIBRARY)
 
include $(CLEAR_VARS)
 
LOCAL_MODULE := HelloWorldMobile
 
LOCAL_CFLAGS := -pipe -fno-exceptions -fno-rtti -fstrict-aliasing -Wno-deprecated-declarations
 
ifndef NDEBUG
LOCAL_CFLAGS += -g -D_DEBUG
else
LOCAL_CFLAGS += -fexpensive-optimizations -O3
endif
 
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS += -fno-stack-protector
endif
 
LOCAL_C_INCLUDES := ../../include libs/freealut/freealut-1.1.0/include libs/openal-soft-master/jni/OpenAL/include
 
LOCAL_SRC_FILES := main.cpp android_tools.cpp
 
LOCAL_LDLIBS := -lEGL -llog -lGLESv1_CM -lGLESv2 -lz -landroid
 
LOCAL_STATIC_LIBRARIES := Irrlicht android_native_app_glue
LOCAL_SHARED_LIBRARIES := openal
 
include $(BUILD_SHARED_LIBRARY)
 
$(call import-module,android/native_app_glue)
 
# copy Irrlicht data to assets
 
$(shell mkdir.exe -p assets)
$(shell mkdir.exe -p assets/media)
$(shell mkdir.exe -p assets/media/Shaders)
$(shell mkdir.exe -p src)
$(shell cp ../../media/Shaders/*.* assets/media/Shaders/)
$(shell cp ../../media/irrlichtlogo3.png assets/media/)
$(shell cp ../../media/dwarf.x assets/media/)
$(shell cp ../../media/dwarf.jpg assets/media/)
$(shell cp ../../media/axe.jpg assets/media/)
$(shell cp ../../media/fonthaettenschweiler.bmp assets/media/)
$(shell cp ../../media/bigfont.png assets/media/)


Seriously at a loss :/
LunaRebirth
 
Posts: 301
Joined: Sun May 11, 2014 12:13 am

Re: Android Audio

Postby LunaRebirth » Sat Oct 21, 2017 7:21 am

Perhaps you wouldn't mind helping me out by building my test.

The location should be the same as the rest of the Irrlicht examples.

Download: http://download19.mediafire.com/wo5lx920aabg/n92nwzbupxukd2i/01.HelloWorld_Android_OpenAL.zip
LunaRebirth
 
Posts: 301
Joined: Sun May 11, 2014 12:13 am

Re: Android Audio

Postby CuteAlien » Sat Oct 21, 2017 7:52 pm

Sorry, I'm too afraid of the time that can take (I think last time I spend 1-2 weeks fulltime until I got Android sound working). And for Windows I haven't set-up an environment for compiling Android so far (will do that one day, but currently my weekends are already too short *sigh*).

The trouble with that kind of bugs is that it might mean you'll have to modify OpenAL library directly and add debug-output in there to find out what's going on. Or spend some time with gdb (which as so many stuff on NDK doesn't work too well with Android). Maybe you can get some help from OpenAL-soft authors.
IRC: #irrlicht on irc.freenode.net
Code snippets, patches&stuff: http://www.michaelzeilfelder.de/irrlicht.htm
Free racer created with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
User avatar
CuteAlien
Admin
 
Posts: 8365
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany

Re: Android Audio

Postby LunaRebirth » Sat Oct 21, 2017 10:22 pm

Alright thanks anyways. Maybe I'll try out cAudio or SDL or something instead. Looks like very few have a decent license + free + cross-platform. SDL would work great if it had multi-audio support
LunaRebirth
 
Posts: 301
Joined: Sun May 11, 2014 12:13 am

Previous

Return to Beginners Help

Who is online

Users browsing this forum: Exabot [Bot] and 1 guest