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

Request a better algorithm for the audio shuffle #52

Closed
DanKill99 opened this issue Oct 25, 2021 · 4 comments
Closed

Request a better algorithm for the audio shuffle #52

DanKill99 opened this issue Oct 25, 2021 · 4 comments

Comments

@DanKill99
Copy link

Hello

I would like to have a better algorithm for the shuffle because I find it not very efficient.

Example: I have a playlist of 1049 mp3. He starts playing the first song, then when I do the next one, he puts the 1049, next 1048, 1047, 1045, 1037, 1044, 1041, 1038, 1011, 1039, 1003 ... I find that the shuffle does not mix a lot between mp3s.

I did other tests. I forced the application to close and cleared the cache and restarted Fermata Auto. Started the same playlist of 1049 mp3 in shuffle mode starting with the first song and when I do the next, the shuffle takes the same order, 1049, 1048, 1047, 1045, 1037, 1044, 1041, 1038, 1011, 1039, 1003 ... So no change.

Another test, I forced the app close and cleared the cache and restarted Fermata Auto. Started the same playlist of 1049 mp3 in shuffle mode starting with song 105 and when I do next, the shuffle takes the same order, 1049, 1048, 1047, 1045, 1037, 1044, 1041, 1038, 1011, 1039, 1003 ... No change yet.

I would like to have a more efficient shuffle like doing a different random each time the app is started.

Thank you for your support

@AndreyPavlenko
Copy link
Owner

The shuffle algorithm is based on the standard Java random. If you close the app, there is no guarantee that the app is really closed, because Android keeps apps running as long, as it considers to be necessary. To make sure than an app is closed, run the 'kill' command.
Alternatively to the 'shuffle' option I'd recommend using the random sort option in the upper top corner.

@DanKill99
Copy link
Author

On android, I go to the app options and press the force stop button to kill process.

The alternative you suggest to me, random sort option only works in the folder where the mp3 is located. I use a playlist and there is no random option.

@AndreyPavlenko
Copy link
Owner

AndreyPavlenko commented Oct 25, 2021

Right, there is no such option for playlists.

Seems, the root cause is this bug - https://bugs.java.com/bugdatabase/view_bug.do?bug_id=7051516
To be fixed in the next version.

@AndreyPavlenko
Copy link
Owner

Until the next version is released, you may use this workaround:
Restart the app.
Go to any folder and click on the random sort option a few times.

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

No branches or pull requests

2 participants