AudioAnchor icon indicating copy to clipboard operation
AudioAnchor copied to clipboard

Android 11: Play speed limited + freezing the app

Open Stiralbios opened this issue 2 years ago • 5 comments

Hello,

I recently updated to my phone and since then I cannot increase the play speed above ~2 (see screenshot), I tried on 4 differents files and had the issue each time so it's pretty consistent. When you increase the speed above ~2 and you try to play an other file then the app become non responsive. I didn't had the issue on android 10 and other apps (such as VLC) are able to play the files at any speed. The app version is 2.3.2

Screenshot_20220527-171829

Stiralbios avatar May 28 '22 08:05 Stiralbios

This was discussed in #76. AudioAnchor uses Android's MediaPlayer class. I don't see anything else in my implementation that could be the issue so I assume Android's MediaPlayer cannot play certain files above a certain speed. It might be related to the bit rate of the file.

You could try the following (see last comment in #76):

You could try the following (the result would be interesting for me, too): in case you are using Linux, install SoundConverter and use it to convert the file to a constant bitrate of 128kbps (Preferences -> Bitrate mode: Constant, Quality: Normal) and check if the problem persists. Similar tools exist for Windows as well.

I will try to fix the non-responsiveness however.

flackbash avatar Jun 06 '22 10:06 flackbash

Ok thanks. I converted the file on the screenshot (to constant 128kbits) and I was able to go around 2.5x speed with the same phone, same version of the app and no new phone update. Then I tried with the original file and I was able to go around 2.5x too (even if it's a file with variable and higher bitrate). It's very weird cause last time it was around 2.1x. So it's not as consistent as I thought, maybe it sort of depend of the load of the phone.

If the non-responsiveness can be fix it would already be great. Plus, if you are sure it comes from Android's MediaPlayer class, maybe it's worth a try to create an issue in Android issue tracker : https://source.android.com/setup/contribute/report-bugs

Stiralbios avatar Jun 06 '22 13:06 Stiralbios

I couldn't find a file where I could not go up to the maximal speed (I don't remember which file I originally used to reproduce the problem) so I couldn't reproduce the freezing problem either. Could you send me a file to my email (you can find the address here) on which the problem somewhat reliably occurs?

flackbash avatar Jun 11 '22 08:06 flackbash

Somehow right now I am able to play the sames files at ~3.0 speed and without the freeze. I am not quite sure what happen before. It seems to not really be linked to the files themself. Sometimes it happen for almost any files and sometimes it's fine with the same files.

Stiralbios avatar Jun 11 '22 19:06 Stiralbios

FWIW, I’ve almost never been able to go above ~2.2x (for Opus or MP3 files). I get an error message if I try to set the speed higher. This is on an Android 9 system. I guess it’s related to either Android’s MediaPlayer class or my phone/hardware.

huftis avatar Jun 13 '22 19:06 huftis