Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to crosscompile for Android #135

Closed
jrojoCI3 opened this issue Dec 4, 2019 · 8 comments
Closed

How to crosscompile for Android #135

jrojoCI3 opened this issue Dec 4, 2019 · 8 comments
Assignees

Comments

@jrojoCI3
Copy link

jrojoCI3 commented Dec 4, 2019

Hello, I was trying to use LabSound in Android. I was encouraged when I saw the following in the README.md:

In the past, LabSound has been demonstrated to work on iOS, Android, and Linux via JACK.

However I'm quite new to crosscompilation and I must admit that I'm a little bit lost in the field.
As extra information, I'm compiling from a 86x64 Linux (Ubuntu 18.04 distribution). Any advice or hint on how to compile this project for Android would be useful.

Thank you so much.

@meshula
Copy link
Member

meshula commented Dec 5, 2019

This branch: https://github.com/ltchris/LabSound includes cmake script modifications to enable Android cross compilation. I haven't tested it, but if I were to undertake a port, I'd start by cherry picking from that branch. Unfortunately, that branch has all the files moved around, so it's not a straight forward cherry pick, it would have to be a manual merge.

Before attempting such a thing, I'd suggest building LabSound for your Ubuntu installation, to make sure that much works for you. At this point, I don't have bandwidth to work on it, but I'm happy to answer questions, or accept a PR.

@jrojoCI3
Copy link
Author

jrojoCI3 commented Dec 5, 2019

Thank you really much! We will try from there. We could already compile for Linux: that's not an issue and looks like it works fine. If we manage to successfully compile for Android we will try to pull some comments into the documentation and/or some files in case we have to modify them.

@meshula
Copy link
Member

meshula commented Jan 8, 2020

I've started on a miniaudio backend for LabSound (https://github.com/dr-soft/miniaudio), that should enable Android support, as well as iOS and Raspberry Pi.

@meshula
Copy link
Member

meshula commented Jan 9, 2020

@jrojoCI3 - the mac_on_rtaudio branch is ready to test for output (not yet for input). The LabSound.cmake file will need a little tweak at the top of the file to set the LABSOUND_USE_MINIAUDIO option to ON, and the LABSOUND_USE_RTAUDIO option to off in the case that the platform is Android. If you have an opportunity to give it a try, feedback would be greatly appreciated.

@meshula meshula self-assigned this Jan 9, 2020
@meshula
Copy link
Member

meshula commented Jan 12, 2020

@jrojoCI3 --- the branch, https://github.com/LabSound/LabSound/tree/mac_on_rtaudio now supports input and output, and should automatically configure for Android if you have specified the Android toolchain file when configuring LabSound.

@jrojoCI3
Copy link
Author

@meshula - First of all, thank you really much for the support! Unfortunately, we're currently on a sprint for another project. However, as soon as we're done with it (probably by the end of January) we will try and test this new branch. Anyway it sounds promising.

@meshula
Copy link
Member

meshula commented Feb 19, 2020

The device_api_wpi branch has a fully worked miniaudio backend, so it should be a straight shot to the finish line now. As before, you'll need to specify an Android tool chain, and set the LABSOUND_USE_MINIAUDIO variable ON while configuring with Cmake.

@meshula
Copy link
Member

meshula commented Mar 16, 2020

The miniaudio backend is now merged to master. @jrojoCI3 please re-open this issue if things are not working for you!

@meshula meshula closed this as completed Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants