[Csnd] Android Csound - Architectures (ABI)
Date | 2017-12-05 18:08 |
From | Steven Yi |
Subject | [Csnd] Android Csound - Architectures (ABI) |
Hi All, For those using Android Csound, I am currently looking at the build. The state of it is: 1. Compiling Csound with NDK r11c (an older version, but one I've used a couple years now), I can compile everything but the Ableton Link opcodes. 2. Compiling with NDK r16 (the most recent released), I get crashes from clang while compiling csound. The message reports it happening while compiling for armv5, which leads me to the following. Right now we are compiling for armeabi and armeabi-v7a. In NDK r16, armeabi has been deprecated and it will be removed in NDK r17 [1]. I am going to move forward with removing armeabi from our build and to add in arm64-v8a (64-bit ARM). Even when we first built Csound for Android, running Csound on armeabi (arm v5) was somewhat useless as it was pretty much unusably slow. It was useful for a while for the purpose of running Csound on desktop Android emulators, but that was about it. Additionally, I think it's a bit of an oversight not to have arm64 support at this point. I'm going to look into this today and, if building can work out with r16, I will post a test build today. At that point, it would be good to get some testing by others, particularly arm64. Thanks! steven [1] - https://developer.android.com/ndk/guides/abis.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2017-12-05 18:13 |
From | Rory Walsh |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
I've been removing the armeabi stuff from my builds lately as it appears to be mostly useless. At least for my own personal projects. So I'm fine with this change. Let's see what others think. On 5 Dec 2017 6:09 p.m., "Steven Yi" <stevenyi@gmail.com> wrote: Hi All, |
Date | 2017-12-05 18:19 |
From | Michael Gogins |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
I'm fine with removing armeabi. Best, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Tue, Dec 5, 2017 at 1:13 PM, Rory Walsh |
Date | 2017-12-05 18:24 |
From | Steven Yi |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
Thanks for that feedback. I'm not too, too worried about removing armeabi (and doing so seems to have fixed clang crashing here!), but I'm thinking through what we did when we put first put together Csound on Android and I'm trying to remember if we didn't hard code some data type sizes somewhere. That'd probably manifest into unexpected behavior for the arm64 build. On Tue, Dec 5, 2017 at 1:13 PM, Rory Walsh |
Date | 2017-12-05 20:23 |
From | Steven Yi |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
Update: I've made the changes for: * Remove armeabi, add arm64-v8a * Update gradlew to use 4.3.1 * Update projects for use with Android Studio 3.0.1 (Latest stable version of Android Studio) I've uploaded a build of Csound for Android here: http://kunstmusik.com/csound-android-6.10.0-beta.zip I ran the Csound Examples project on my Moto G4, which I believe has an arm64 CPU. I was able to get realtime output, but some of the examples that asked for audio input did not work. (I suspect it is a permissions issue; if anyone has experience here please do chime in.) What would be great at this point: * Please test this release out with the supplied Examples project. * Please test the CsoundAndroid release out with your own projects. I have also pushed the changes I've made to the android studio and NDK project files to Git. Thanks, steven On Tue, Dec 5, 2017 at 1:24 PM, Steven Yi |
Date | 2017-12-08 11:14 |
From | Jacques Leplat |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
Hello Steven, I tried to run on an Android Pixel (64 bit). Like you the examples produce sound OK, but fail to get audio input. The Csound Android examples manifest has the correct permission to record audio. I tried using the wavemaker sample from google, and recording works, it has the same manifest permissions as the Csound Android examples. The wavemaker sample does not use open SL. Android has launched another audio API (https://developer.android.com/ndk/guides/audio/aaudio/aaudio.html), the sample uses aaudio. It is only good for Orio or later though. There is a github project run by Google people, which is meant to wrap OpenSL and AAudio (OpenSL ES on API 16+ or AAudio on API 26+), but audio input is still being developed. https://github.com/google/oboe Below is an extract of the log when running the Csound Android example that uses audio input. 12-08 10:48:00.986 18822-19219/? D/CsoundObj: displays suppressed 12-08 10:48:00.986 18822-19219/? D/CsoundObj: 0dBFS level = 1.0 12-08 10:48:00.986 18822-19219/? D/CsoundObj: WARNING: real time midi input disabled, using dummy functions 12-08 10:48:00.986 18822-19219/? D/CsoundObj: orch now loaded 12-08 10:48:00.986 18822-19219/? D/CsoundObj: audio buffered in 128 sample-frame blocks 12-08 10:48:00.986 18822-19219/? D/CsoundObj: engineObject... 12-08 10:48:00.986 18822-19219/? D/CsoundObj: realized... 12-08 10:48:00.986 18822-19219/? D/CsoundObj: interface acquired... 12-08 10:48:00.986 18822-19219/? D/CsoundObj: OpenSL: CreateAudioRecorder failed. 12-08 10:48:00.986 18822-19219/? D/CsoundObj: OpenSL: openSLRecOpen error (2). 12-08 10:48:00.986 18822-19219/? D/CsoundObj: Failed to initialise real time audio input 12-08 10:48:00.986 18822-19219/? D/CsoundObj: Return Value2: -1 12-08 10:48:00.986 18822-19219/? D/CsoundObj: THREAD END All the best, Jacques
|
Date | 2017-12-08 16:37 |
From | Steven Yi |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
Hi Jacques, Thanks very much for confirming the issues I saw and for bringing up Oboe. Our Android build and Csound SDK needs updating at some point (e.g., when we put it together, CMake was not supported with NDK like it is now: https://developer.android.com/ndk/guides/cmake.html). I've filed an issue on Csound's tracker (https://github.com/csound/csound/issues/887) to keep track of this so we remember to look into Oboe when it develops further. I think for 6.10, we should limit the scope to just getting the audio recording to work. I'll look into this a bit today. Cheers! steven On Fri, Dec 8, 2017 at 6:14 AM, Jacques Leplat |
Date | 2017-12-08 21:19 |
From | Steven Yi |
Subject | Re: [Csnd] Android Csound - Architectures (ABI) |
I looked into this and determined it is related to trying to open stereo input and OpenSL causing a failure, at least on my device. Switching to nchnls_i=1 allows the project to open but there was another bug found. I've reported this to the dev list and await feedback/fixes. On Fri, Dec 8, 2017 at 11:37 AM, Steven Yi |