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

Upload Android APK to GitHub (pre)release #125

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ThreeDeeJay
Copy link

@ThreeDeeJay ThreeDeeJay commented Feb 11, 2024

We'll be able to download the Android app from the repo's GitHub releases like this: https://github.com/ThreeDeeJay/sview/releases/tag/latest

The reason for this is that HRTF is broken in the current Android app, apparently because of 2 reasons:

I figured this out because since my phone happened to be rooted, I was able to replace the .so library in /data/app/.../<sview lib folder>/ and also create a alsoftrc.config in /etc/openal/ where I specified an existing path to load the MHR from (According to the log, it attempts to load MHRs from /usr/local/share/openal/hrtf, /usr/share/openal/hrtf and ./, which seem like Linux paths that aren't present/accessible by non-root apps on Android). After this, HRTF worked in surround/ambisonics files even without having to turn it on in the settings.

Anyhow, I submitted gkv311/sview-deps-android#1 to fix one part of the issue, till we figure out how to embed/load custom MHRs externally. 👀👌

@ThreeDeeJay
Copy link
Author

ThreeDeeJay commented Aug 4, 2024

@gkv311 Good news: Turns out there was a bug in OpenAL Soft that caused the Android library to crash when attempting to load the embedded HRTF, but it was just fixed earlier in kcat/openal-soft#1010 (comment)

Also, the pre-built library can now be downloaded from GitHub Actions artifacts https://github.com/kcat/openal-soft/actions/runs/10230657183, which I included in my sview-deps-android fork

So long story short, merging this PR and gkv311/sview-deps-android#1 should fix HRTF👏
Just gotta enable it in the settings. No more need for root, config file or external HRTFs.

@gkv311
Copy link
Owner

gkv311 commented Aug 4, 2024

Also, the pre-built library can now be downloaded from GitHub Actions artifacts

It's nice to see OpenAL soft have automated builds for Android now!

@ThreeDeeJay
Copy link
Author

ThreeDeeJay commented Aug 4, 2024

It's nice to see OpenAL soft have automated builds for Android now!

Absolutely.

By the way, would you happen to know how to get the AudioDeviceInfo type and getExternalFilesDirs (e.g. storage/emulated/0/Android/data/com.sview/) via C++ instead of Java?
We're hoping that'd allow OpenAL Soft to detect headphones to auto-enable HRTF, and to load user config/HRTF, respectively.

Otherwise, perhaps sView could add the external app data folder as a path to load alsoft.conf and MHR (HRTF) files on its end 🤔

The app would set the ALSOFT_LOCAL_PATH env var with setenv to the path it provides for the user to add mhr files (where it will look in the given path directly, no subdirs). Or append a path to XDG_DATA_DIRS where OpenAL Soft will then look in <path>/openal/hrtf/ for more mhr files.

Similarly, it can prepend a path to XDG_CONFIG_DIRS where it will look for <path>/alsoft.conf. This needs to be done before making any OpenAL calls, since OpenAL Soft will initialize and load the config settings on certain calls, and won't reload the configs afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants