mywave82 / opencubicplayer

Open Cubic Player (unix fork). Music visualizer for various tracked music formats (amiga modules, S3M, IT), chiptunes and other formats related to demoscene
https://stian.cubic.org/project-ocp.php
GNU General Public License v2.0
280 stars 19 forks source link

Shuffle is not random #116

Closed aquamarine-axo closed 2 months ago

aquamarine-axo commented 2 months ago

When attempting to add a folder to the playlist with the randomplay option in the configuration enabled, the order in which the songs are in placed in the playlist, is in the same pseudorandom order every single time.

mywave82 commented 2 months ago

Shuffle just affects how songs are picked from the playlist (when you simply press enter if you already are playing a song, and want the next song).

The order songs are put onto the playlist if adding a folder/archive, is the order they appear from the operating system when retrieving the file list. That might be improved upon.

mywave82 commented 2 months ago

The order songs are put onto the playlist if adding a folder/archive, is the order they appear from the operating system when retrieving the file list. That might be improved upon.

This detail should be fixed by 9f19a19ea275ce974687ef08a9b3716453acc223

aquamarine-axo commented 2 months ago

With the ocp-git package on Arch Linux, and with randomplay=on in ocp.ini, now all of the modules are added alphabetically instead of randomly.

aquamarine-axo commented 2 months ago

Trying to enter my user directory also sometimes tries to read from... seemingly everywhere in my user folder? It also gives a lot of errors on-screen because it often can't read from the folders it's trying to access

rine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-dbus-broker.service-OsLTJa/") failed
                                                                                                                                                             [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-bluetooth.service-4UJxL0/") failed
                                             [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-systemd-logind.service-ii2mWY/") failed
                                                                                                                                                      [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-polkit.service-ksDnwz/") failed
                                   [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-upower.service-X5Avjw/") failed
                                                                                                                                    [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/tty/driver/") failed
                                                                                                                                                                          [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/lost+found/") failed
                   [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-systemd-timesyncd.service-dm770P/") failed
                 [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-dbus-broker.service-OsLTJa/") failed
         [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-bluetooth.service-4UJxL0/") failed
                                                                                                                                                                                                                   [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-systemd-logind.service-ii2mWY/") failed
                                                                                                                                                                                                              [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-polkit.service-ksDnwz/") failed
                                                                                                                                                                                                 [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/tmp/systemd-private-97adec987e174ca59861775af1ddf8ea-upower.service-X5Avjw/") failed
                                                                                                                                                                                    [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/tty/driver/") failed
                                                                                                            [filesystem unix readdir_start]: opendir ("/home/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/aquamarine/.local/share/Steam/steamapps/compatdata/7200/pfx/dosdevices/z:/proc/self/task/382849/fd/33/lost+found/") failed
                                                           zsh: quit (core dumped)  ocp
                                                                                       %
mywave82 commented 2 months ago

I am guessing that you might (accidently) press right/left/insert or delete, which will cause OCP to recursively search for music files.

Combined with the fact that steam seems to virtually map the proc filesystem causing folder forever recursive during walk. So there are two independent problems to look into to avoid the crash: