-
Notifications
You must be signed in to change notification settings - Fork 227
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Android support #83
Comments
Some progress reported here: https://sourceforge.net/p/llcon/discussion/533517/thread/cfd165e0/#452b/6e3b |
Is there any instructions on how to build this? or any specific branch/forked repository I could refer to? From the previous links there seems to be some implementation working to some extent. I might be able to give a hand, at least testing |
The code on master is from Simon. But it does not work correctly. Recently, I have started a branch where I do some testing. But also, nothing working yet. |
Ok, thanks. I got it to compile and started testing. There's an mistake on android/sound.cpp: on pSound->vecsTmpAudioSndCrdStereo[frmNum * oboeStream->getChannelCount() + channelNum] =
(short) floatData[frmNum * oboeStream->getChannelCount() + channelNum] * _MAXSHORT; should be pSound->vecsTmpAudioSndCrdStereo[frmNum * oboeStream->getChannelCount() + channelNum] =
(int16_t)(floatData[frmNum * oboeStream->getChannelCount() + channelNum] * _MAXSHORT); otherwise the precedence of the casting operator will make the input always 0. Changing that if I write to a file the content To continue progressing I might need to understand better how the whole things work (I'm not at all familiar with neither your code or even the oboe library). A few doubts:
In this last case, I'd go probably for a temporary circular buffer where the |
I'll merge from a branch soon, where the int 16 type is replaced by float.
Yes, the input/output audio vector for the audio interfaces is assumed to be always stereo. If you have only a mono stream available, just write the same audio data in both stereo channels. On my branch https://github.com/corrados/jamulus/tree/android_testing I tried to use the full duplex oboe example class. But it is not yet finished. There is function onBothStreamsReady which should have the same size for input and output (which is what Jamulus expects). |
I've got some working code at j-santander@a3558aa In my tests I can hear other clients and they can hear me. Not sure of the overall quality of sound. Key modification was to setup the callback only on the input stream and do explicit write to the output stream after processing the incoming data. I'll try to have a look at the code in the android_testing branch and incorporate it. Let me know what you think or how should I proceed. Cheers |
My code on the android_testing branch is not working. I was just experimenting a bit. You do not need to use any of that code. If you have something working, then you could create a pull request. I can then test it on my Android phone. But be aware that some minutes ago I applied a big change to the code on master. |
Created PR #661. Thanks |
How’s the quality? I assume it would be best to try it with a LAN adapter |
I might be able to test with more people today. |
i'm interested to test the android code but i do not have experience to compile qt5 project for andoid can you help me? |
@j-santander I tested your code and it crashed with "AudioStreamRecord: maybeConvertDeviceData() conversion size 256 too large for buffer 128". I had the same error message on my Android testing branch. This is a known bug in the Oboe library. We have to use a newer version. Just to let you know: I'll now update the Oboe Git submodule to the newest Oboe code now to avoid this issue. |
I just updated the Oboe library version but unfortunately, it still crashes, now with a different error message: " InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed." |
Oh, I'll test it more on my side. I didn't experience neither of the errors. I'm on Android 11, not sure if it has anything to do. |
Well, I didn't even have experience on Qt. I used the Qt installer (https://www.qt.io/download-qt-installer) and made sure the Android support was marked. Using the Qt Creator, I had to set up paths to SDKs and NDKs and select the target for android. |
i installed all the requirements for the QT and i'm able to set the Andorid Target. But the compiler return error.....oboe/Oboe.h not found any idea? |
The oboe library is stored as a git submodule, I believe you need to do: git submodule update --init |
i updated the submodule but the error is the same i try to copy oboe include folder into jamulus main path or android folder but nothin |
I've been trying with different devices, and although there are problems with the sound quality, I haven't experienced any crashes like the ones you report. What Android version are you in? what terminal? What I've tried so far:
Regarding quality:
|
Ok, let's recap. What I did was:
Regarding the actual source. oboe is a git submodule which is located at libs/oboe. Make sure it has been checkout properly. Hope this helps |
Have you been able to jam with other on any of these devices yet? Could you measure the overall latency you got?
I have a special setup: LineagesOS 16.0 (Android 9) on a Samsung Galaxy S5 (SM-G901F)
We actually do this for all OSs. It is not the preferred way of doing it but it works fine. |
I did try briefly, but I'm in the middle of trying to deploy this to my choir and the focus of sessions is to get the people onboarded. Regarding the latency. Right now, I'm connected to a local server in my LAN: From the Windows Client (desktop - ethernet connected) the "Configuration" reports Overall Delay 39 ms. (Ping Time 1 ms). From my Google Pixel 3a, over WiFi, Overall Delay varies quite a lot from 55 to 80 and 90 ms. I guess it is due to the great variation on Ping Time from 2 to 33 ms. Not sure if that's the measurement you're after.
ok, I'm not sure if I could find a way of emulating that.
Ok, I look into that. I might need to implement a circular buffer because in some of the models it seems that I cannot write the whole batch of frames of output frames in one go. I'll keep testing and see how far I can go. |
So you intention is to bring your choir to jamulus using their Android phones? Very interesting. Please post your results here since I guess a lot of other choir members would love to use their phones for Jamulus, too.
No problem if not. My device is very old and I do not expect a good latency coming out of it. So just focus on the newer phones, that's fine. |
I think there was an attempt for iOS, but the repo disappeared. See iOS version thread on sourceforge. |
Sorry folks, I believe my disappearance requires a bit of explanation. As I described above, what I did over the existing code for Android that Volker and Simon had in place was just a bit of bug fixing and small adjustments. However, as I was thinking about further involvement I realized that this was uncomfortably close to my day job (not really a direct overlap, but there might be technologies and techniques in common), so before involving myself any further, I decided to clear it up with my management. They sent a request to legal department and we're still waiting for an answer. Regarding building. All my modifications were accepted to master, but I haven't tried to build it recently. Not sure if recent changes might have broken the build. |
Thanks @j-santander for the update. |
How does the UI look like on Android? I compiled Jamulus for iOS and it doesn't show anything for me. I assume, we might need QML for both operating systems? |
The UI on Android looks the same as on the PC. No need for QML. |
Ok. I hope, my problem can be fixed in some way without having to rewrite the UI for iOS |
Qt should give you the same GUI on all platforms. |
Hi,
I got the code compiled and the GUI running, but not Audio transmission. Will try a different device as next step... |
I have the audio part well working on my tablet (X10605). Some UI issues are still open (mainly using the "back" button) I am thinking about a source for "nightly" APKs, for those eager to have at least anything. |
GH actions should be able to build it automatically. Once #828 is merged and tested, it should be quite easy to add an action which automatically builds apk files. |
That would be creat. Since the Action searches for a "r*" tag, I could easily create beta versions by simply tagging the Git repo with something like r3.6.2beta1. |
Yes, that’s possible but will also move the latest tag. I tried to setup an Android build environment on a clean Debian 10 VM but didn’t succeed unfortunately. |
I tried with an Ubuntu, but also no success yet. |
Until an official build is available, the APK of my pull request can be found here: |
I've now created a project board on this topic, since I think it's a larger one. It would be great if we could close this issue and document needed changes in separate issues and in https://github.com/jamulussoftware/jamulus/projects/6 |
Just a quick reminder here: Thanks to nefarius we have working .apk android builds here: https://github.com/jamulussoftware/jamulus/releases/tag/r3_7_0beta3 Once 3.7.0 is out, GitHub actions will automatically build apk files for every new release. |
I'm wondering if we want to bless them as "official" already or rather mark them as experimental for now? I gave them a quick try and while the UI worked, I did not manage to get usable sound out of it on a Moto G4 Play (distortion in short frequency, not the typical Wifi-related unreliability). If this is supposed to work, I should probably open a bug report about it. Until now I assumed that this was some kind of proof of concept...? :) |
Yes. You're right. I just edited my post. Some people have reported "usable" results: #1142 |
Moving this to discussion in the interests of keeping issues to actionable work items. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
This issue has been migrated from Sourceforge. Created: 2015-12-13
Creator: Volker Fischer
Add support for the Android operating system. The software can already be compiled for Android but the audio interface does not work right now. So the first step is to finish the audio interface implementation. As a second step, all GUI functionality must be checked that it is possible to use it with a touch screen only.
The text was updated successfully, but these errors were encountered: