Closed goshleg closed 2 weeks ago
Also see #51
which requires shared-stdcxx feature enabled on android build.
Are you saying that there is no other way to use oboe than with the shared libraries? In the linked pr I quote docs that claim something else (but I have no experience there).
Hello, I accidentally missed your pr. I have read it, and now I'm not sure if there is no other way. In Bevy the shared-stdcxx
feature is required on android, but we can try to set it up in macroquad engine, for testing purposes
I'm watching this thread to see what you all find out. I don't have an Android development environment set up right now.
I guess https://github.com/rust-mobile/rust-android-examples/tree/main/agdk-oboe shows that oboe can in general be used without the shared-stdcxx
feature.
I didn't managed how to successfully compile macroquad on android, but I compiled a simple winit app on android, then I added code for playing audio with kira 0.8.4 but I got the same __cxa_pure_virtual
error, not on compilation stage, but when launched app and read logcat
Then I switched kira dependency to my local branch with shared-stdcxx
fix, and there was no __cxa_pure_virtual
error in logcat, but there wasn't sound either. Logcat says that AAudioStream_requestStop(s#1)
was called, so I didn't found out the reason why its happening, I have tried to sleep the thread with std::time::thread::sleep()
, but it didn't worked, so the reason is not because of AudioManager
and StaticSoundData
are out of scope.
I have just been reading the logcat and found this line:
It says that the audio file wasn't located. I've packed audio file the same way I did in bevy, and it seems that this is the wrong way to pack an audio file to apk in this context. I think that if one'll do it right, it will work with shared-stdcxx
enabled.
I can confirm that it only works with shared-stdcxx
enabled.
I have managed to launch audio with kira on ios, but on android I got compilation issue:
I figured out that error was caused by oboe crate from cpal deps, which requires
shared-stdcxx
feature enabled on android build. With this changes kira works on android perfectly :)