34
34
namespace lmms ::Clipboard
35
35
{
36
36
37
- const QStringList projectExtensions{" mmp" , " mpt" , " mmpz" };
38
- const QStringList presetExtensions{" xpf" , " xml" , " xiz" , " lv2" };
39
- const QStringList soundFontExtensions{" sf2" , " sf3" };
40
- const QStringList patchExtensions{" pat" };
41
- const QStringList midiExtensions{" mid" , " midi" , " rmi" };
42
- #ifdef LMMS_BUILD_WINDOWS
43
- const QStringList vstPluginExtensions{" dll" };
44
- #else
45
- const QStringList vstPluginExtensions{" dll" , " so" };
46
- #endif
47
- QStringList audioExtensions{};
37
+ static const QStringList projectExtensions{" mmp" , " mpt" , " mmpz" };
38
+ static const QStringList presetExtensions{" xpf" , " xml" , " xiz" , " lv2" };
39
+ static const QStringList soundFontExtensions{" sf2" , " sf3" };
40
+ static const QStringList patchExtensions{" pat" };
41
+ static const QStringList midiExtensions{" mid" , " midi" , " rmi" };
42
+ static QStringList vstPluginExtensions{};
43
+ static QStringList audioExtensions{};
48
44
49
45
// ! gets the extension of a file, or returns the string back if no extension is found
50
46
inline QString getExtension (const QString& file)
@@ -54,10 +50,22 @@ namespace lmms::Clipboard
54
50
}
55
51
56
52
//
57
- /* @brief updates the lists of extensions. TODO: currently, this only applies for audioExtensions, but all the lists should be made
53
+ /* @brief updates the lists of extensions.
54
+ * TODO: currently, this only applies for audioExtensions and vstPluginExtensions, but all the lists should be filled dynamically
58
55
*/
59
56
void updateExtensionLists ()
60
57
{
58
+ #if defined(LMMS_BUILD_WIN32)
59
+ vstPluginExtensions = QStringList{" dll" }
60
+ #elif defined(LMMS_BUILD_LINUX)
61
+ #if defined(LMMS_HAVE_VST_32) || defined(LMMS_HAVE_VST_64)
62
+ vstPluginExtensions = QStringList{" so" , " dll" };
63
+ #else
64
+ vstPluginExtensions = QStringList{" so" };
65
+ #endif
66
+ #endif
67
+
68
+ audioExtensions.clear ();
61
69
for (const SampleDecoder::AudioType& at : SampleDecoder::supportedAudioTypes ())
62
70
{
63
71
audioExtensions += QString::fromStdString (at.extension );
0 commit comments