Android UNTZ initialize problem

FMOD / Untz / Native

Moderators: ezraanderson, ibisum

Android UNTZ initialize problem

Postby SpaceRanger » Wed Sep 11, 2013 8:36 am

Hi! Has anyone else experienced problems initializing UNTZ using the latest Android host on GitHub (master branch)? When I call MOAIUntzSystem.initialize() my app freezes up before it even tries to play a sound. It works fine with the 1.4p0 SDK. I made sure UNTZ was enabled when I built the new moai-dev/master Android host, of course :)

Thanks!
SpaceRanger
 
Posts: 4
Joined: Tue Sep 10, 2013 6:50 pm

Re: Android UNTZ initialize problem

Postby joshua@jandyco » Wed Sep 11, 2013 8:50 am

Can you run adb logcat while your app is running and provide us with any output such as crashes, exceptions, etc?
joshua@jandyco
 
Posts: 71
Joined: Wed Jun 05, 2013 5:33 pm

Re: Android UNTZ initialize problem

Postby SpaceRanger » Wed Sep 11, 2013 9:10 am

Thanks for the reply! Okay, so I noticed the following in the logcat output:

I/MoaiLog (25225): main.lua:26: attempt to index global 'MOAIUntzSystem' (a nil value)

Hmm, well, that would explain why it's not working. Not sure how to fix it though - I didn't come across any errors when building the Android host.
SpaceRanger
 
Posts: 4
Joined: Tue Sep 10, 2013 6:50 pm

Re: Android UNTZ initialize problem

Postby joshua@jandyco » Wed Sep 11, 2013 9:22 am

It looks like Android is using the wrong preprocessor macro to determine if untz or fmod is enabled. See here:
https://github.com/moai/moai-dev/search ... ef=cmdform

I believe the moai.cpp should be checking for MOAI_WITH_UNTZ.

I can make a pull request to fix this, tonight when I get home.

EDIT: On second thought that may not be the case as IOS is doing the same thing however blackberry is doing it slightly differently:
https://github.com/moai/moai-dev/search ... ef=cmdform

I'm not sure right now. I can take a look at it later though.
joshua@jandyco
 
Posts: 71
Joined: Wed Jun 05, 2013 5:33 pm

Re: Android UNTZ initialize problem

Postby SpaceRanger » Wed Sep 11, 2013 9:32 am

That'd be awesome :) Thanks for the help!!
SpaceRanger
 
Posts: 4
Joined: Tue Sep 10, 2013 6:50 pm

Re: Android UNTZ initialize problem

Postby SpaceRanger » Wed Sep 11, 2013 11:55 am

Changing LOCAL_CFLAGS += -DMOAI_WITH_UNTZ to LOCAL_CFLAGS += -DUSE_UNTZ in ant/libmoai/jni/Android.mk did the trick - sound is working again. Yay :)

Cheers for pointing me in the right direction.
SpaceRanger
 
Posts: 4
Joined: Tue Sep 10, 2013 6:50 pm

Re: Android UNTZ initialize problem

Postby joshua@jandyco » Wed Sep 11, 2013 12:04 pm

Okay good to know that is the correct direction. I'll update the official repository as soon as I get a chance.
joshua@jandyco
 
Posts: 71
Joined: Wed Jun 05, 2013 5:33 pm

Re: Android UNTZ initialize problem

Postby joshua@jandyco » Sat Sep 21, 2013 8:31 am

Okay, I created a pull request to address this issue: https://github.com/moai/moai-dev/pull/783
joshua@jandyco
 
Posts: 71
Joined: Wed Jun 05, 2013 5:33 pm


Return to Sound + Music

Who is online

Users browsing this forum: No registered users and 0 guests

cron

x