igorski/MWEngine

Build Project

phamcongnguyen opened this issue · 8 comments

hi guy,

I'm Nguyen, i enjoy the project very much. Howerver, i download it, and import, i get some errors about project when building project. There are images for project in Eclipse and Android Studio
image
image

I downloaded Android NDK.
Can you help me about this or guide me to step by step build project?
Thanks!

Hello Nguyen,

From the screenshots it looks like all the classes in the nl.igorski.lib.nativeaudio-namespace are unavailable. This is expected as by default these Java classes are only available after the engine has been compiled using both the Android NDK and SWIG (which should by default come with an Android NDK installation). After running such a build the "/src"-folder of your project should contain the nl.igorski.lib.nativeaudio-namespace and contain the missing classes.

According to your first screenshot you have built the engine, but I'm wondering whether the SWIG wrappers have also been created (as a note : the Android NDK compiles the C++ source code into a library, while SWIG creates an interface where you can call the library's code through Java). Might I suggest taking the latest build.bat (available now in the MWEngine repository) and running that batch file to build the engine ? This file ensures creation of both the SWIG wrappers as well as compiling the library.

Also as a sidenote on updating the engine: by the looks of it, the engine version you are using is slightly outdated (nl.igorski.lib.audio.NativeAudioRenderer is now called MWEngine which gave it away), updating to the latest version available on Github introduces some performance and usability updates.

If the problem persists, don't hesitate to drop a line :)

Thank you very much! it has done well.

But now, i want to play a song, speed up or slow down playing this song, where will i config?
Because i'm having a project relating the speed up or slow down playing music in android, i have searched a lot but no result. Can you help me?
Thanks! :)

Hello Nguyen, good to hear it has resolved your issue!

For your questions, can you send me an message through my website (http://www.igorski.nl/#/contact) and mention what kind of application you are creating (e.g. are you creating a song using samples/synthesis in real time or looking to play back an .mp3 file or something similar?), then I can answer your questions better.

Closing this issue as the original problem has been resolved with the updated build script :)

I have setup all project requirement and project now running in my device but its MWEngineActivity launch and shutdown ( no crash )at the same time nothing error is showing please help me what is going wrong in my project.

Hi @pawanasaticnpl there is no Error in the AndroidRuntime ? Then the Error might be occuring on the native layer. You can catch these errors by using:

adb logcat | ndk-stack -sym obj/local/armeabi-v7a

(replace armeabi-v7a with the CPU architecture you're using, e.g. one of: armeabi, armeabi-v7a, x86 or mips). Did you make changes to the native code ? If you haven't, then it's likely that your environment might not be supported. What type of device/emulator are you running the project on ?

I am running it on Samsung alpha 5.0 Lollipop

Are you using the latest NDK version ? If so, the latest compiler might be less forgiving with certain coding conventions. I have made changes to the offending classes. If you pull, could you build the native code again and see whether that resolves your issue (note Java namespace has also changed from nativeaudio to mwengine). Be sure to use target 23 in project.properties as the higher targets of the Android NDK are still a tad.. buggy.

@pawanasaticnpl further investigation pointed out that the default NDK build target was set too high for a Lollipop OS. If you pull the latest changes from master you should by default be able to build and deploy onto that device without problems.

If it persists could you create a new issue as this is not related to this threads original issue ?