-
Notifications
You must be signed in to change notification settings - Fork 142
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
Is there any way to build to iOS/Android module? #2
Comments
Today I added a C interface to the library and implemented Python bindings. I think this C interface can be used for iOS development. A simple example to demonstrate how to use would be great though. JNI bindings are necessary for Android development - will try to implement those along the way. Would be awesome if someone is willing to help with this - my iOS/Android experience is very limited. |
How is the Waver Android app using your C code? I assumed that you had already done the JNI to build Waver. |
In Waver I used https://github.com/pthom/hello_imgui for the boilerplate and only had to plugin my C++ code. It uses SDL for audio capture/playback and the C++ SDL functions are automatically doing what they are supposed to. For |
I can take a shot at the Android side. I recommend that I create a separate project as a "spike solution". We can then determine what of that you like and how you would want to migrate those pieces into this GitHub repo (or some other repo of yours). Let me know if that is OK or if you would prefer some other approach — thanks! |
Sounds good. Ideally I would like to have a simple test for each platform/language which simply encodes and decodes some data without using any audio engine. I've currently made such tests for C, C++ and Python in When you are ready with the Android project we can look into incorporating it in this repo. Let me know if you think the C API can be improved in any way. I am planning to add a few more functions to it. My next goal is to implement Javascript bindings with it using Emscripten. |
To be completely honest... it could use documentation. For example:
My apologies if some of this should be obvious. I am very good with Android, but my serious C/C++ work is 20 years in my past. I can still do some light JNI work, but I am not in position to attempt to try to determine this sort of information solely from reading your C++ source code. |
Absolutely agree - I need to work on that. https://github.com/ggerganov/ggwave/blob/master/include/ggwave/ggwave.h#L21-L195 I hope these can answer your questions.
So the naming of the 2 things is reversed between the two functions, which is kind of confusing. I added "todo" comments to the
Correct, but not always the case. To summarize:
|
That's a huge help — thanks! In terms of the content format, though... is this raw PCM? Some of your code is centered around WAV files, which suggests that the content format is PCM, but I may be misinterpreting what I'm seeing in that code. |
Yes - we generate and process only raw PCM. Whenever I used the word |
OK, after having poked at this a while, I have concluded that I lack enough JNI ability to do this well. I will see if I can find some other way to get you the help that you need. |
No worries, I really appreciate the effort! Thanks! |
I'm back! 😁 I still needed a proof of concept for using GGWave in an Android app. So, I put together this demo that uses your JavaScript implementation in an Android If you have any questions about that project or things that would help you if I added there, let me know! I'll be making minor tweaks to it along the way. |
Awesome! My initial attempts to make a mobile demo were to use the JS/Wasm port in a Cordova project, but I couldn't figure out all the details. This looks really well done. I will take a more detailed look these days and try to run it myself. |
I have finally implemented an Objective-C iOS app using ggwave: |
Minimal Android example in Java/C++ is now also available: |
Hi,The demo show this code is so great.
I am not familiar with the C building to iOS/android sdk, there will be more helpful for a example to build to mobile platform.
Thank you very much.
The text was updated successfully, but these errors were encountered: