Problems with Spotify in Anbox

  • Hi!

    I've been trying to get Spotify working with Anbox on my Nexus 5, but I've hit a bit of a snag. It works fine until I lock the phone, at which point the audio starts to crackle a lot. Unlocking the phone solves the issue. I've tried multiple versions of both Spotify and Spotify Lite, but I get the same result no matter which version I use. So my question is, has anyone here gotten Spotify to work in the background on UBports with Anbox?

  • @hoogs I had the same issue. I did not find a fix. The only thing I found out is, that it did not happen if I play the music via bluetooth. I bought a cheap bluetooth receiver for my headphones and used it like this for a few weeks.

    Because I had other issues with anbox (regarding camera freezes, nexus 5), I removed anbox again.

  • @schouk IIRC you tried investigating the media hub and other ways to send the audio.

    Now it looks like "solving" the issue with bluetooth was achieved by degrading the audio quality to allow it to be more fluid...

    It was explained that when the phone is locked the processor is slower. Maybe the audio stream from spotify is too hard to decode in real time for the processor.
    Bluetooth is known to have a lower bitrate so the audio stream is lighter than the original one.
    My guess is that bluetooth requiring a lower bandwidth the processor is now able to process the audio stream in real time.
    Or maybe downgrading the stream is easier than processing it through the audio output...

    What I would try is to bufferize the stream to give some slack to the processor to produce a clean audio output. I hope this can help.

    [Edit] Maybe it's just RAM usage restricting the buffer size hence leading to those audio glitches

Log in to reply