Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar. (Read 1468 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar.

In DSP manager DSP presets are sorted alphabetically.
But in DSP switcher in toolbar they are sorted... how? By the date of creation? Can we have them sorted alphabetically just like in DSP manager?

Re: [Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar.

Reply #1
Bump, while in beta. I still believe that sorting DSP presets by date of creation is counter-logical an not convenient.

Re: [Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar.

Reply #2
Unfortunately attempt to fix this in 1.4.1 beta 3 leaded to mess. Now names of presets (in toolbar DSP switcher) don't correspond to their actual presets.
See video: https://youtu.be/qZff6MJ0EiY

Re: [Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar.

Reply #3
Hence why I was wondering how he handled the sorting issues. Typically, you have to do a lot more than just enabling sorting on the Droplist control. You have to internally sort them yourself, using a qsort or similar with a proper string sort algorithm, and each string must be paired with an identifier indicating its original position in your internal list. You could use a full structure and store the full DSP GUID in there, or you could keep the GUID in an unsorted array and store just an index integer in the sorting structures.

Either way, simply using sorted Droplists is Completely Broken, because while the dialog automatically sorts your strings, it doesn't keep any sort of unique identifier to go with your strings, so they're still 0-indexed based on their actual position in the auto-sorted list. I've already had to deal with Crap Like This at least once, so that I learned how to do proper sorted associative arrays for Droplist values.

Now, if you want to look at A Complete Fracking Mess, see: foo_midi configuration for which driver to use. It has so many fracking special cases just to deal with preset indexes in the list versus in configuration option. I really should just make a string or even GUID parameter for each of those things, and overhaul the entire preferences and preset system. Yuck.

 

Re: [Feature request] Sort DSP presets alphabetically in DSP switcher in toolbar.

Reply #4
Thanks for reporting the bug so quickly. Beta 4 posted, DSP switcher now works like it should.
Microsoft Windows: We can't script here, this is bat country.