#ifndef __PLUGIN__ #define __PLUGIN__ #include #include #include #include #include #ifndef AUDACIOUS_VGMSTREAM_PRIORITY /* set higher than FFmpeg's 10 */ #define AUDACIOUS_VGMSTREAM_PRIORITY 9 #endif class VgmstreamPlugin : public InputPlugin { public: //static const char *const exts[]; static const char *const defaults[]; static const char about[]; static const PreferencesWidget widgets[]; static const PluginPreferences prefs; static constexpr PluginInfo info = { N_("vgmstream Decoder"), N_("vgmstream"), about, &prefs, }; 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 ) {} bool init(); void cleanup(); bool is_our_file(const char *filename, VFSFile &file); Tuple read_tuple(const char *filename, VFSFile &file); bool read_tag(const char * filename, VFSFile & file, Tuple & tuple, Index * image); bool play(const char *filename, VFSFile &file); }; // static extension list, not sure of advantages (uses is_our_file) //const char *const VgmstreamPlugin::exts[] = { "ext1", "ext2", ..., NULL } typedef struct { bool loop_forever; int loop_count; double fade_length; double fade_delay; int downmix_channels; bool exts_unknown_on; bool exts_common_on; } audacious_settings; extern audacious_settings settings; void vgmstream_settings_load(); void vgmstream_settings_save(); #endif