Hi,
This has been one of my pet peeves forever: Winamp still does not sort files added via the explorer context menus, regardless of the settings in Preferences. This has been a bug forever, as far as I can tell:
Frankly it blows my mind that this is still not fixed after being reported years ago, since I can't imagine it being anything but a trivial fix. If it helps get this thing resolved (without actually seeing the code), the problem is most likely that you're using the Windows FindNextFile API call directly, which makes no guarantee about the returned file order.
To fix this, all you need to do is store the WIN32_FIND_DATA structs in a temporary array or vector or whatever, then sort on filename before passing them off to the playlist. For extra goodness, you could choose a sort algorithm that will perform well on pre-sorted data, and then when loading files off NTFS, the sort won't be wasteful.
This is not strictly related to FAT32, either, since most Linux filesystems store files in whatever order they see fit, for performance reasons. This will cause files played off a Linux file server network drive to come up in non-alphabetic order. Sorting is supposed to be up to the application.
The same mechanism would probably work as well for sorting multiple played files, or for drag-and-drop file adds, both of which seem to exibit the same behavior.
If anyone's still actually coding on Winamp (unclear from reading the news), they should be able to whip this out in a few hours. It's really not that complicated.
-- Scott
PS: Despite my somewhat negative tone, I still think Winamp is historically the greatest thing that ever happened to music on computers, and I just want it to be the best it can be.
This has been one of my pet peeves forever: Winamp still does not sort files added via the explorer context menus, regardless of the settings in Preferences. This has been a bug forever, as far as I can tell:
Frankly it blows my mind that this is still not fixed after being reported years ago, since I can't imagine it being anything but a trivial fix. If it helps get this thing resolved (without actually seeing the code), the problem is most likely that you're using the Windows FindNextFile API call directly, which makes no guarantee about the returned file order.
To fix this, all you need to do is store the WIN32_FIND_DATA structs in a temporary array or vector or whatever, then sort on filename before passing them off to the playlist. For extra goodness, you could choose a sort algorithm that will perform well on pre-sorted data, and then when loading files off NTFS, the sort won't be wasteful.
This is not strictly related to FAT32, either, since most Linux filesystems store files in whatever order they see fit, for performance reasons. This will cause files played off a Linux file server network drive to come up in non-alphabetic order. Sorting is supposed to be up to the application.
The same mechanism would probably work as well for sorting multiple played files, or for drag-and-drop file adds, both of which seem to exibit the same behavior.
If anyone's still actually coding on Winamp (unclear from reading the news), they should be able to whip this out in a few hours. It's really not that complicated.
-- Scott
PS: Despite my somewhat negative tone, I still think Winamp is historically the greatest thing that ever happened to music on computers, and I just want it to be the best it can be.
Comment