diff --git a/audacious/plugin.cc b/audacious/plugin.cc index 1dc32493..fa8c238f 100644 --- a/audacious/plugin.cc +++ b/audacious/plugin.cc @@ -37,6 +37,16 @@ extern "C" { audacious_settings settings; VGMSTREAM *vgmstream = NULL; //todo make local? +/* Audacious will first send the file to a plugin based on this static extension list. If none + * accepts it'll try again all plugins, ordered by priority, until one accepts the file. Problem is, + * mpg123 plugin has higher priority and tendency to accept files that aren't even MP3. To fix this + * we declare a few conflicting formats so we have a better chance. + * The extension affects only this priority and in all cases file must accepted during "is_our_file". + */ +const char *const VgmstreamPlugin::exts[] = { + "ahx","asf","awc","ckd","fsb","genh","msf","p3d","rak","scd","str","txth","xvag", nullptr +}; + const char *const VgmstreamPlugin::defaults[] = { "loop_forever", "FALSE", diff --git a/audacious/plugin.h b/audacious/plugin.h index 716e6234..d7a5c50f 100644 --- a/audacious/plugin.h +++ b/audacious/plugin.h @@ -14,7 +14,7 @@ class VgmstreamPlugin : public InputPlugin { public: - //static const char *const exts[]; + static const char *const exts[]; static const char *const defaults[]; static const char about[]; static const PreferencesWidget widgets[]; @@ -25,9 +25,9 @@ public: }; constexpr VgmstreamPlugin() : InputPlugin (info, - InputInfo() //InputInfo(FlagSubtunes) // allow subsongs - .with_priority(AUDACIOUS_VGMSTREAM_PRIORITY) // where 0=default(?), 10=lowest - //.with_exts(exts)) {} //accepted exts are validated at runtime now + InputInfo() //InputInfo(FlagSubtunes) // allow subsongs + .with_priority(AUDACIOUS_VGMSTREAM_PRIORITY) // where 0=highest, 10=lowest + .with_exts(exts)) {} // priority exts (accepted exts are still validated at runtime) ) {} bool init(); @@ -39,9 +39,6 @@ public: }; -// static extension list, not sure of advantages (uses is_our_file) -//const char *const VgmstreamPlugin::exts[] = { "ext1", "ext2", ..., NULL } - typedef struct { bool loop_forever;