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

Compatibility with Wavelet (Android Headphone DSP app) #1221

Closed
1 of 2 tasks
inodentry opened this issue Feb 9, 2024 · 10 comments · Fixed by #1247
Closed
1 of 2 tasks

Compatibility with Wavelet (Android Headphone DSP app) #1221

inodentry opened this issue Feb 9, 2024 · 10 comments · Fixed by #1247
Labels
bug Something isn't working

Comments

@inodentry
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'd like to use Wavelet for Headphone DSP/EQ while listening to music. When I start playing music in other apps, Wavelet detects that there is an "audio session" and enables the settings. Spotube is not detected and does not work.

Expected Behavior

When playing music in Spotube, Wavelet detects it and is able to apply EQ and other effects to the audio.

Steps to reproduce

  1. Install and setup Wavelet: https://play.google.com/store/apps/details?id=com.pittvandewitt.wavelet
  2. Try playing something in another app (Youtube, Soundcloud, work just fine to give some examples), to make sure it is working. Wavelet should detect that audio is playing and be able to intercept the audio and apply effects like EQ.
  3. Try playing something in Spotube. It does not show up in Wavelet.

Operating System

Android

Spotube version

No response

Installation source

Play Store (Android)

Additional information

Their website has some instructions for other music players that might not work out of the box: https://pittvandewitt.github.io/Wavelet/Configuration/ . My interpretation of what I am reading there seems to suggest that if a music player is not compatible out of the box, it might be because of the APIs it uses to play audio, and in most such players, enabling any setting for in-app audio processing (such as in-app EQ or something, whatever the player offers) forces it to use some sort of different API or mode for audio playback, which can be detected by Wavelet. Spotube does not seem to have any settings that could affect how it plays audio via the Android OS.

I am reporting this issue with Spotube rather than Wavelet, because of this. It seems to me like the problem is with how Spotube plays audio in Android, and not what Wavelet does.

Self grab

  • I'm ready to work on this issue!
@inodentry inodentry added the bug Something isn't working label Feb 9, 2024
@olivier2
Copy link
Contributor

olivier2 commented Feb 9, 2024

Hey @inodentry , good news! I tested Wavelet with Spotube configured with the AudioTrack audio output (see issue #571 ) and it works in Legacy mode. If you're able to compile from source, you're good to go.

@mustard007
Copy link

When I use Jiosaavn audio source, Wavelet works, otherwise it doesn't work with Youtube or Piped audio source.

@inodentry
Copy link
Author

inodentry commented Feb 9, 2024

Hey @inodentry , good news! I tested Wavelet with Spotube configured with the AudioTrack audio output (see issue #571 ) and it works in Legacy mode. If you're able to compile from source, you're good to go.

Legacy mode does not seem to be compatible with my phone (Fairphone 5). I used it on my old phone (Samsung Galaxy S10 5G), it worked fine there, but I can't use it on this phone. When I tried to do some research about it, the only info I found was related to the "Disable Hardware Bluetooth A2DP Handling" setting in Developer Settings. I tried messing with that option, but changing it completely broke my audio. Either Wavelet has no effect, or I have no audio at all whatsoever.

This is why I'd like all the apps I use to work in the normal (not Legacy) mode in Wavelet. Spotube is the only one that doesn't. So I filed this issue, so we can investigate why that might be.

I would try your commit you linked, but I don't know how to compile/build Android apps. I've never really developed for Android before. I see the commit is already in the repo / merged. Is there going to be a new release soon?

Looking at the commit and the issue, it does seem like it could fix it.

@olivier2
Copy link
Contributor

olivier2 commented Feb 9, 2024

This is why I'd like all the apps I use to work in the normal (not Legacy) mode in Wavelet. Spotube is the only one that doesn't. So I filed this issue, so we can investigate why that might be.

Do you know of any open source android player that work in the normal (not Legacy) mode in Wavelet?

I see the commit is already in the repo / merged. Is there going to be a new release soon?

Unlikely, I only committed in a fork I own and haven't submitted a pull request. I found something that fixes the issue by luck and have absolutely no idea what that change will do on other android devices.

@inodentry
Copy link
Author

Oh okay i didnt realize the link was to a fork. Sorry.

Okay. I will try to learn how to build the Spotube Android app from source so that I can try it out.

I can try some open-source media players to see how they behave. I'll report findings later. :)

@olivier2
Copy link
Contributor

For reference, here's a high level overview of how equalizer apps, like Wavelet, attach to other players on android.

Also, 2 implementations of a how to broadcast the audio session id to other apps: moneytoo/Player and NewPipe

@olivier2
Copy link
Contributor

@inodentry it works! 🎉

Wavelet-small.mp4

olivier2 added a commit to olivier2/spotube that referenced this issue Feb 10, 2024
KRTirtho added a commit that referenced this issue Feb 25, 2024
…ion id (#1221 & #1247)

* this change fixes the garbled audio on my Pixel 6a while the screen is off. Not familiar with libmpv, but seems to favor audiotrack audio output over opensles. #571

* get audio session id, send it to AudioTrack in libmpv, broadcast it to other apps. Fixes #1221

---------

Co-authored-by: Kingkor Roy Tirtho <[email protected]>
@olivier2
Copy link
Contributor

@inodentry, can you test the nightly and report back if it works as expected?

@inodentry
Copy link
Author

Yes! Just tried it, and it is detected! That's awesome.

Should I close the issue or leave it open until there is an actual release with the fix?

@olivier2
Copy link
Contributor

I think issue will be closed automatically once it's merge in master

@KRTirtho KRTirtho closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Deployed
Development

Successfully merging a pull request may close this issue.

4 participants