Fix some files not being played correctly in Audacious

This commit is contained in:
bnnm 2019-10-13 19:09:17 +02:00
parent 7214dfbef7
commit 98ed9b6a02
2 changed files with 14 additions and 7 deletions

View File

@ -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",

View File

@ -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;