2013-04-08 23:32:53 +02:00
|
|
|
/*
|
2021-01-01 19:54:25 +01:00
|
|
|
* Copyright 2003-2021 The Music Player Daemon Project
|
2013-04-08 23:32:53 +02:00
|
|
|
* http://www.musicpd.org
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "GmeDecoderPlugin.hxx"
|
2014-01-24 00:02:24 +01:00
|
|
|
#include "../DecoderAPI.hxx"
|
2018-10-07 22:33:41 +02:00
|
|
|
#include "config/Block.hxx"
|
2020-01-18 20:07:09 +01:00
|
|
|
#include "pcm/CheckAudioFormat.hxx"
|
2018-08-02 13:45:43 +02:00
|
|
|
#include "song/DetachedSong.hxx"
|
2017-02-08 08:26:58 +01:00
|
|
|
#include "tag/Handler.hxx"
|
|
|
|
#include "tag/Builder.hxx"
|
2014-02-07 18:52:19 +01:00
|
|
|
#include "fs/Path.hxx"
|
2014-12-02 07:11:11 +01:00
|
|
|
#include "fs/AllocatedPath.hxx"
|
2017-09-26 15:42:43 +02:00
|
|
|
#include "fs/FileSystem.hxx"
|
2020-06-10 20:58:46 +02:00
|
|
|
#include "fs/NarrowPath.hxx"
|
2016-11-10 12:04:05 +01:00
|
|
|
#include "util/ScopeExit.hxx"
|
2020-02-18 21:06:52 +01:00
|
|
|
#include "util/StringCompare.hxx"
|
2018-01-24 12:52:43 +01:00
|
|
|
#include "util/StringFormat.hxx"
|
2013-09-27 22:31:24 +02:00
|
|
|
#include "util/Domain.hxx"
|
|
|
|
#include "Log.hxx"
|
2013-04-08 23:32:53 +02:00
|
|
|
|
2016-11-22 09:33:52 +01:00
|
|
|
#include <gme/gme.h>
|
|
|
|
|
2020-03-12 23:20:59 +01:00
|
|
|
#include <cassert>
|
|
|
|
|
2010-10-14 17:11:59 +02:00
|
|
|
#include <stdlib.h>
|
2010-04-10 10:05:16 +02:00
|
|
|
|
2010-10-14 17:11:59 +02:00
|
|
|
#define SUBTUNE_PREFIX "tune_"
|
|
|
|
|
2013-09-27 22:31:24 +02:00
|
|
|
static constexpr Domain gme_domain("gme");
|
|
|
|
|
2013-04-08 23:32:53 +02:00
|
|
|
static constexpr unsigned GME_SAMPLE_RATE = 44100;
|
|
|
|
static constexpr unsigned GME_CHANNELS = 2;
|
|
|
|
static constexpr unsigned GME_BUFFER_FRAMES = 2048;
|
|
|
|
static constexpr unsigned GME_BUFFER_SAMPLES =
|
|
|
|
GME_BUFFER_FRAMES * GME_CHANNELS;
|
2010-05-31 09:45:52 +02:00
|
|
|
|
2014-12-02 06:25:11 +01:00
|
|
|
struct GmeContainerPath {
|
2014-12-02 07:11:11 +01:00
|
|
|
AllocatedPath path;
|
2014-12-02 06:25:11 +01:00
|
|
|
unsigned track;
|
|
|
|
};
|
|
|
|
|
2015-10-26 16:48:38 +01:00
|
|
|
#if GME_VERSION >= 0x000600
|
|
|
|
static int gme_accuracy;
|
|
|
|
#endif
|
2020-04-26 15:07:59 +02:00
|
|
|
static unsigned gme_default_fade;
|
2015-10-26 16:48:38 +01:00
|
|
|
|
|
|
|
static bool
|
2020-03-12 20:56:11 +01:00
|
|
|
gme_plugin_init([[maybe_unused]] const ConfigBlock &block)
|
2015-10-26 16:48:38 +01:00
|
|
|
{
|
|
|
|
#if GME_VERSION >= 0x000600
|
|
|
|
auto accuracy = block.GetBlockParam("accuracy");
|
|
|
|
gme_accuracy = accuracy != nullptr
|
|
|
|
? (int)accuracy->GetBoolValue()
|
|
|
|
: -1;
|
|
|
|
#endif
|
2020-04-26 15:07:59 +02:00
|
|
|
auto fade = block.GetBlockParam("default_fade");
|
|
|
|
gme_default_fade = fade != nullptr
|
|
|
|
? fade->GetUnsignedValue() * 1000
|
|
|
|
: 8000;
|
2015-10-26 16:48:38 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2014-12-02 07:11:11 +01:00
|
|
|
gcc_pure
|
|
|
|
static unsigned
|
2017-05-08 14:44:49 +02:00
|
|
|
ParseSubtuneName(const char *base) noexcept
|
2014-12-02 07:11:11 +01:00
|
|
|
{
|
2020-06-10 21:02:28 +02:00
|
|
|
base = StringAfterPrefix(base, SUBTUNE_PREFIX);
|
|
|
|
if (base == nullptr)
|
2014-12-02 07:11:11 +01:00
|
|
|
return 0;
|
|
|
|
|
|
|
|
char *endptr;
|
|
|
|
auto track = strtoul(base, &endptr, 10);
|
|
|
|
if (endptr == base || *endptr != '.')
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
return track;
|
|
|
|
}
|
|
|
|
|
2010-10-14 17:11:59 +02:00
|
|
|
/**
|
2014-12-02 06:25:11 +01:00
|
|
|
* returns the file path stripped of any /tune_xxx.* subtune suffix
|
|
|
|
* and the track number (or 0 if no "tune_xxx" suffix is present).
|
2010-10-14 17:11:59 +02:00
|
|
|
*/
|
2014-12-02 06:25:11 +01:00
|
|
|
static GmeContainerPath
|
|
|
|
ParseContainerPath(Path path_fs)
|
2010-10-14 17:11:59 +02:00
|
|
|
{
|
2014-12-02 07:11:11 +01:00
|
|
|
const Path base = path_fs.GetBase();
|
|
|
|
unsigned track;
|
|
|
|
if (base.IsNull() ||
|
2020-06-10 20:58:46 +02:00
|
|
|
(track = ParseSubtuneName(NarrowPath(base))) < 1)
|
2014-12-02 07:11:11 +01:00
|
|
|
return { AllocatedPath(path_fs), 0 };
|
2014-12-02 06:25:11 +01:00
|
|
|
|
2014-12-02 07:11:11 +01:00
|
|
|
return { path_fs.GetDirectoryName(), track - 1 };
|
2010-10-14 17:11:59 +02:00
|
|
|
}
|
|
|
|
|
2020-06-10 21:18:45 +02:00
|
|
|
static AllocatedPath
|
|
|
|
ReplaceSuffix(Path src,
|
2020-06-10 22:58:14 +02:00
|
|
|
const PathTraitsFS::const_pointer new_suffix) noexcept
|
2020-06-10 21:18:45 +02:00
|
|
|
{
|
|
|
|
const auto *old_suffix = src.GetSuffix();
|
|
|
|
if (old_suffix == nullptr)
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
PathTraitsFS::string s(src.c_str(), old_suffix);
|
|
|
|
s += new_suffix;
|
|
|
|
return AllocatedPath::FromFS(std::move(s));
|
|
|
|
}
|
|
|
|
|
2017-09-22 16:51:36 +02:00
|
|
|
static Music_Emu*
|
2020-03-18 05:43:29 +01:00
|
|
|
LoadGmeAndM3u(const GmeContainerPath& container) {
|
2017-09-22 16:51:36 +02:00
|
|
|
|
2013-04-08 23:32:53 +02:00
|
|
|
Music_Emu *emu;
|
|
|
|
const char *gme_err =
|
2020-06-10 20:58:46 +02:00
|
|
|
gme_open_file(NarrowPath(container.path), &emu, GME_SAMPLE_RATE);
|
2013-04-08 23:32:53 +02:00
|
|
|
if (gme_err != nullptr) {
|
2013-09-27 22:31:24 +02:00
|
|
|
LogWarning(gme_domain, gme_err);
|
2017-09-22 16:51:36 +02:00
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2020-06-10 20:58:46 +02:00
|
|
|
const auto m3u_path = ReplaceSuffix(container.path,
|
|
|
|
PATH_LITERAL("m3u"));
|
2017-09-26 15:42:43 +02:00
|
|
|
/*
|
|
|
|
* Some GME formats lose metadata if you attempt to
|
|
|
|
* load a non-existant M3U file, so check that one
|
|
|
|
* exists before loading.
|
|
|
|
*/
|
2020-06-10 21:18:45 +02:00
|
|
|
if (!m3u_path.IsNull() && FileExists(m3u_path))
|
2020-06-10 20:58:46 +02:00
|
|
|
gme_load_m3u(emu, NarrowPath(m3u_path));
|
2020-06-10 21:18:45 +02:00
|
|
|
|
2017-09-22 16:51:36 +02:00
|
|
|
return emu;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
gme_file_decode(DecoderClient &client, Path path_fs)
|
|
|
|
{
|
|
|
|
const auto container = ParseContainerPath(path_fs);
|
|
|
|
|
|
|
|
Music_Emu *emu = LoadGmeAndM3u(container);
|
|
|
|
if(emu == nullptr) {
|
2010-04-10 10:05:16 +02:00
|
|
|
return;
|
|
|
|
}
|
2010-10-14 17:11:59 +02:00
|
|
|
|
2016-11-10 12:04:05 +01:00
|
|
|
AtScopeExit(emu) { gme_delete(emu); };
|
|
|
|
|
2021-06-25 17:26:41 +02:00
|
|
|
FmtDebug(gme_domain, "emulator type '{}'",
|
|
|
|
gme_type_system(gme_type(emu)));
|
2015-10-26 17:00:27 +01:00
|
|
|
|
2015-10-26 16:48:38 +01:00
|
|
|
#if GME_VERSION >= 0x000600
|
|
|
|
if (gme_accuracy >= 0)
|
|
|
|
gme_enable_accuracy(emu, gme_accuracy);
|
|
|
|
#endif
|
|
|
|
|
2013-04-08 23:32:53 +02:00
|
|
|
gme_info_t *ti;
|
2017-09-22 16:51:36 +02:00
|
|
|
const char *gme_err = gme_track_info(emu, &ti, container.track);
|
2013-04-08 23:32:53 +02:00
|
|
|
if (gme_err != nullptr) {
|
2013-09-27 22:31:24 +02:00
|
|
|
LogWarning(gme_domain, gme_err);
|
2010-04-10 10:05:16 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2015-10-26 17:16:20 +01:00
|
|
|
const int length = ti->play_length;
|
2020-04-26 15:24:34 +02:00
|
|
|
#if GME_VERSION >= 0x000700
|
|
|
|
const int fade = ti->fade_length;
|
|
|
|
#else
|
|
|
|
const int fade = -1;
|
|
|
|
#endif
|
2015-10-26 17:15:24 +01:00
|
|
|
gme_free_info(ti);
|
|
|
|
|
|
|
|
const SignedSongTime song_len = length > 0
|
2020-04-26 15:24:34 +02:00
|
|
|
? SignedSongTime::FromMS(length +
|
|
|
|
(fade == -1 ? gme_default_fade : fade))
|
2014-08-29 20:52:39 +02:00
|
|
|
: SignedSongTime::Negative();
|
2010-04-10 10:05:16 +02:00
|
|
|
|
|
|
|
/* initialize the MPD decoder */
|
|
|
|
|
2016-11-10 11:45:17 +01:00
|
|
|
const auto audio_format = CheckAudioFormat(GME_SAMPLE_RATE,
|
|
|
|
SampleFormat::S16,
|
|
|
|
GME_CHANNELS);
|
2010-04-10 10:05:16 +02:00
|
|
|
|
2016-11-18 07:59:01 +01:00
|
|
|
client.Ready(audio_format, true, song_len);
|
2010-04-10 10:05:16 +02:00
|
|
|
|
2014-12-02 06:25:11 +01:00
|
|
|
gme_err = gme_start_track(emu, container.track);
|
2013-04-08 23:32:53 +02:00
|
|
|
if (gme_err != nullptr)
|
2013-09-27 22:31:24 +02:00
|
|
|
LogWarning(gme_domain, gme_err);
|
2010-04-10 10:05:16 +02:00
|
|
|
|
2020-04-26 15:24:34 +02:00
|
|
|
if (length > 0 && fade != 0)
|
2020-04-22 21:49:10 +02:00
|
|
|
gme_set_fade(emu, length
|
|
|
|
#if GME_VERSION >= 0x000700
|
2020-04-26 15:24:34 +02:00
|
|
|
, fade == -1 ? gme_default_fade : fade
|
2020-04-22 21:49:10 +02:00
|
|
|
#endif
|
|
|
|
);
|
2011-02-03 00:25:35 +01:00
|
|
|
|
2010-04-10 10:05:16 +02:00
|
|
|
/* play */
|
2013-09-27 12:11:37 +02:00
|
|
|
DecoderCommand cmd;
|
2010-04-10 10:05:16 +02:00
|
|
|
do {
|
2013-04-08 23:32:53 +02:00
|
|
|
short buf[GME_BUFFER_SAMPLES];
|
2010-05-31 09:44:30 +02:00
|
|
|
gme_err = gme_play(emu, GME_BUFFER_SAMPLES, buf);
|
2013-04-08 23:32:53 +02:00
|
|
|
if (gme_err != nullptr) {
|
2013-09-27 22:31:24 +02:00
|
|
|
LogWarning(gme_domain, gme_err);
|
2010-04-10 10:05:16 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-11-18 08:27:30 +01:00
|
|
|
cmd = client.SubmitData(nullptr, buf, sizeof(buf), 0);
|
2013-09-27 12:11:37 +02:00
|
|
|
if (cmd == DecoderCommand::SEEK) {
|
2016-11-18 08:15:07 +01:00
|
|
|
unsigned where = client.GetSeekTime().ToMS();
|
2014-08-26 11:12:20 +02:00
|
|
|
gme_err = gme_seek(emu, where);
|
2015-10-26 16:32:39 +01:00
|
|
|
if (gme_err != nullptr) {
|
2013-09-27 22:31:24 +02:00
|
|
|
LogWarning(gme_domain, gme_err);
|
2016-11-18 08:15:07 +01:00
|
|
|
client.SeekError();
|
2015-10-26 16:32:39 +01:00
|
|
|
} else
|
2016-11-18 08:15:07 +01:00
|
|
|
client.CommandFinished();
|
2010-04-10 10:05:16 +02:00
|
|
|
}
|
|
|
|
|
2013-04-08 23:32:53 +02:00
|
|
|
if (gme_track_ended(emu))
|
2010-04-10 10:05:16 +02:00
|
|
|
break;
|
2013-09-27 12:11:37 +02:00
|
|
|
} while (cmd != DecoderCommand::STOP);
|
2010-04-10 10:05:16 +02:00
|
|
|
}
|
|
|
|
|
2014-12-01 22:56:48 +01:00
|
|
|
static void
|
2014-12-01 23:28:21 +01:00
|
|
|
ScanGmeInfo(const gme_info_t &info, unsigned song_num, int track_count,
|
2018-07-05 19:07:05 +02:00
|
|
|
TagHandler &handler) noexcept
|
2014-12-01 22:56:48 +01:00
|
|
|
{
|
2015-10-27 11:05:47 +01:00
|
|
|
if (info.play_length > 0)
|
2020-04-26 15:24:34 +02:00
|
|
|
handler.OnDuration(SongTime::FromMS(info.play_length
|
|
|
|
#if GME_VERSION >= 0x000700
|
|
|
|
+ (info.fade_length == -1 ? gme_default_fade : info.fade_length)
|
|
|
|
#endif
|
|
|
|
));
|
2014-12-01 22:56:48 +01:00
|
|
|
|
2018-01-24 12:52:43 +01:00
|
|
|
if (track_count > 1)
|
2019-06-06 12:02:55 +02:00
|
|
|
handler.OnTag(TAG_TRACK, StringFormat<16>("%u", song_num + 1).c_str());
|
2016-11-22 12:19:37 +01:00
|
|
|
|
2020-02-18 21:06:52 +01:00
|
|
|
if (!StringIsEmpty(info.song)) {
|
2014-12-01 22:56:48 +01:00
|
|
|
if (track_count > 1) {
|
|
|
|
/* start numbering subtunes from 1 */
|
2018-01-24 12:52:43 +01:00
|
|
|
const auto tag_title =
|
|
|
|
StringFormat<1024>("%s (%u/%d)",
|
|
|
|
info.song, song_num + 1,
|
|
|
|
track_count);
|
2019-06-06 12:02:55 +02:00
|
|
|
handler.OnTag(TAG_TITLE, tag_title.c_str());
|
2014-12-01 22:56:48 +01:00
|
|
|
} else
|
2018-07-05 19:07:05 +02:00
|
|
|
handler.OnTag(TAG_TITLE, info.song);
|
2014-12-01 22:56:48 +01:00
|
|
|
}
|
|
|
|
|
2020-02-18 21:06:52 +01:00
|
|
|
if (!StringIsEmpty(info.author))
|
2018-07-05 19:07:05 +02:00
|
|
|
handler.OnTag(TAG_ARTIST, info.author);
|
2014-12-01 22:56:48 +01:00
|
|
|
|
2020-02-18 21:06:52 +01:00
|
|
|
if (!StringIsEmpty(info.game))
|
2018-07-05 19:07:05 +02:00
|
|
|
handler.OnTag(TAG_ALBUM, info.game);
|
2014-12-01 22:56:48 +01:00
|
|
|
|
2020-02-18 21:06:52 +01:00
|
|
|
if (!StringIsEmpty(info.comment))
|
2018-07-05 19:07:05 +02:00
|
|
|
handler.OnTag(TAG_COMMENT, info.comment);
|
2014-12-01 22:56:48 +01:00
|
|
|
|
2020-02-18 21:06:52 +01:00
|
|
|
if (!StringIsEmpty(info.copyright))
|
2018-07-05 19:07:05 +02:00
|
|
|
handler.OnTag(TAG_DATE, info.copyright);
|
2014-12-01 22:56:48 +01:00
|
|
|
}
|
|
|
|
|
2014-12-01 23:01:58 +01:00
|
|
|
static bool
|
2018-07-05 19:07:05 +02:00
|
|
|
ScanMusicEmu(Music_Emu *emu, unsigned song_num, TagHandler &handler) noexcept
|
2014-12-01 23:01:58 +01:00
|
|
|
{
|
|
|
|
gme_info_t *ti;
|
|
|
|
const char *gme_err = gme_track_info(emu, &ti, song_num);
|
|
|
|
if (gme_err != nullptr) {
|
|
|
|
LogWarning(gme_domain, gme_err);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
assert(ti != nullptr);
|
|
|
|
|
2016-11-22 11:58:18 +01:00
|
|
|
AtScopeExit(ti) { gme_free_info(ti); };
|
|
|
|
|
2018-07-05 19:07:05 +02:00
|
|
|
ScanGmeInfo(*ti, song_num, gme_track_count(emu), handler);
|
2014-12-01 23:01:58 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
static bool
|
2018-07-05 19:07:05 +02:00
|
|
|
gme_scan_file(Path path_fs, TagHandler &handler) noexcept
|
2010-04-10 10:05:16 +02:00
|
|
|
{
|
2014-12-02 06:25:11 +01:00
|
|
|
const auto container = ParseContainerPath(path_fs);
|
2010-04-10 10:05:16 +02:00
|
|
|
|
2017-09-22 16:51:36 +02:00
|
|
|
Music_Emu *emu = LoadGmeAndM3u(container);
|
|
|
|
if(emu == nullptr) {
|
2012-02-11 19:12:02 +01:00
|
|
|
return false;
|
2010-04-10 10:05:16 +02:00
|
|
|
}
|
2013-04-08 23:32:53 +02:00
|
|
|
|
2016-11-22 11:48:47 +01:00
|
|
|
AtScopeExit(emu) { gme_delete(emu); };
|
2012-02-11 19:12:02 +01:00
|
|
|
|
2018-07-05 19:07:05 +02:00
|
|
|
return ScanMusicEmu(emu, container.track, handler);
|
2010-04-10 10:05:16 +02:00
|
|
|
}
|
|
|
|
|
2016-11-22 12:25:52 +01:00
|
|
|
static std::forward_list<DetachedSong>
|
2016-11-22 15:51:38 +01:00
|
|
|
gme_container_scan(Path path_fs)
|
|
|
|
{
|
2016-11-22 12:25:52 +01:00
|
|
|
std::forward_list<DetachedSong> list;
|
2017-09-22 16:51:36 +02:00
|
|
|
const auto container = ParseContainerPath(path_fs);
|
2016-11-22 15:51:38 +01:00
|
|
|
|
2017-09-22 16:51:36 +02:00
|
|
|
Music_Emu *emu = LoadGmeAndM3u(container);
|
|
|
|
if(emu == nullptr) {
|
2016-11-22 15:51:38 +01:00
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2016-11-22 12:25:52 +01:00
|
|
|
AtScopeExit(emu) { gme_delete(emu); };
|
|
|
|
|
2016-11-22 15:51:38 +01:00
|
|
|
const unsigned num_songs = gme_track_count(emu);
|
|
|
|
/* if it only contains a single tune, don't treat as container */
|
|
|
|
if (num_songs < 2)
|
|
|
|
return list;
|
|
|
|
|
2020-06-10 20:59:52 +02:00
|
|
|
const auto *subtune_suffix = path_fs.GetSuffix();
|
2016-11-22 15:51:38 +01:00
|
|
|
|
2016-11-22 12:25:52 +01:00
|
|
|
TagBuilder tag_builder;
|
|
|
|
|
2016-11-22 15:51:38 +01:00
|
|
|
auto tail = list.before_begin();
|
2017-09-26 15:42:53 +02:00
|
|
|
for (unsigned i = 0; i < num_songs; ++i) {
|
2018-07-05 19:07:05 +02:00
|
|
|
AddTagHandler h(tag_builder);
|
|
|
|
ScanMusicEmu(emu, i, h);
|
2016-11-22 12:25:52 +01:00
|
|
|
|
2018-01-24 12:52:43 +01:00
|
|
|
const auto track_name =
|
|
|
|
StringFormat<64>(SUBTUNE_PREFIX "%03u.%s", i+1,
|
|
|
|
subtune_suffix);
|
2016-11-22 12:25:52 +01:00
|
|
|
tail = list.emplace_after(tail, track_name,
|
|
|
|
tag_builder.Commit());
|
2016-11-22 15:51:38 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return list;
|
|
|
|
}
|
|
|
|
|
2010-04-10 10:05:16 +02:00
|
|
|
static const char *const gme_suffixes[] = {
|
|
|
|
"ay", "gbs", "gym", "hes", "kss", "nsf",
|
2021-03-13 00:42:45 +01:00
|
|
|
"nsfe", "rsn", "sap", "spc", "vgm", "vgz",
|
2013-04-08 23:32:53 +02:00
|
|
|
nullptr
|
2010-04-10 10:05:16 +02:00
|
|
|
};
|
|
|
|
|
2019-06-15 14:44:37 +02:00
|
|
|
constexpr DecoderPlugin gme_decoder_plugin =
|
|
|
|
DecoderPlugin("gme", gme_file_decode, gme_scan_file)
|
|
|
|
.WithInit(gme_plugin_init)
|
|
|
|
.WithContainer(gme_container_scan)
|
|
|
|
.WithSuffixes(gme_suffixes);
|