2009-02-11 20:31:17 +01:00
|
|
|
/*
|
2014-01-13 22:30:36 +01:00
|
|
|
* Copyright (C) 2003-2014 The Music Player Daemon Project
|
2009-02-11 20:31:17 +01: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.
|
2009-03-13 18:43:16 +01:00
|
|
|
*
|
|
|
|
* 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.
|
2009-02-11 20:31:17 +01:00
|
|
|
*/
|
|
|
|
|
2009-11-12 09:12:38 +01:00
|
|
|
#include "config.h"
|
2013-10-20 13:05:29 +02:00
|
|
|
#include "SidplayDecoderPlugin.hxx"
|
2013-07-28 13:18:48 +02:00
|
|
|
#include "../DecoderAPI.hxx"
|
2013-09-05 18:22:02 +02:00
|
|
|
#include "tag/TagHandler.hxx"
|
2014-02-07 18:52:19 +01:00
|
|
|
#include "fs/Path.hxx"
|
2014-12-04 21:11:33 +01:00
|
|
|
#include "fs/AllocatedPath.hxx"
|
2014-02-24 19:38:30 +01:00
|
|
|
#include "util/FormatString.hxx"
|
2013-09-27 22:31:24 +02:00
|
|
|
#include "util/Domain.hxx"
|
2014-12-04 21:30:35 +01:00
|
|
|
#include "util/Error.hxx"
|
2013-10-16 21:09:19 +02:00
|
|
|
#include "system/ByteOrder.hxx"
|
2014-12-04 21:30:35 +01:00
|
|
|
#include "system/FatalError.hxx"
|
2013-09-27 22:31:24 +02:00
|
|
|
#include "Log.hxx"
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2013-07-30 20:11:57 +02:00
|
|
|
#include <string.h>
|
2009-02-11 20:31:17 +01:00
|
|
|
|
|
|
|
#include <sidplay/sidplay2.h>
|
|
|
|
#include <sidplay/builders/resid.h>
|
2009-08-30 19:49:04 +02:00
|
|
|
#include <sidplay/utils/SidTuneMod.h>
|
2014-12-04 21:29:49 +01:00
|
|
|
#include <sidplay/utils/SidDatabase.h>
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
#define SUBTUNE_PREFIX "tune_"
|
|
|
|
|
2013-09-27 22:31:24 +02:00
|
|
|
static constexpr Domain sidplay_domain("sidplay");
|
|
|
|
|
2014-12-04 21:29:49 +01:00
|
|
|
static SidDatabase *songlength_database;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
|
|
|
static bool all_files_are_containers;
|
2009-08-30 19:49:04 +02:00
|
|
|
static unsigned default_songlength;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2009-09-26 02:20:17 +02:00
|
|
|
static bool filter_setting;
|
|
|
|
|
2014-12-04 21:29:49 +01:00
|
|
|
static SidDatabase *
|
2014-12-04 21:30:35 +01:00
|
|
|
sidplay_load_songlength_db(const Path path)
|
2009-09-24 10:14:05 +02:00
|
|
|
{
|
2014-12-04 21:29:49 +01:00
|
|
|
SidDatabase *db = new SidDatabase();
|
|
|
|
if (db->open(path.c_str()) < 0) {
|
2013-09-27 22:31:24 +02:00
|
|
|
FormatError(sidplay_domain,
|
|
|
|
"unable to read songlengths file %s: %s",
|
2014-12-04 21:29:49 +01:00
|
|
|
path.c_str(), db->error());
|
|
|
|
delete db;
|
2013-10-19 18:19:03 +02:00
|
|
|
return nullptr;
|
2009-09-24 10:14:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return db;
|
|
|
|
}
|
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
static bool
|
2013-08-04 11:30:26 +02:00
|
|
|
sidplay_init(const config_param ¶m)
|
2009-08-30 19:48:56 +02:00
|
|
|
{
|
2009-08-30 19:49:04 +02:00
|
|
|
/* read the songlengths database file */
|
2014-12-04 21:30:35 +01:00
|
|
|
Error error;
|
|
|
|
const auto database_path = param.GetBlockPath("songlength_database", error);
|
|
|
|
if (!database_path.IsNull())
|
|
|
|
songlength_database = sidplay_load_songlength_db(database_path);
|
|
|
|
else if (error.IsDefined())
|
|
|
|
FatalError(error);
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2013-08-04 11:30:26 +02:00
|
|
|
default_songlength = param.GetBlockValue("default_songlength", 0u);
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2013-08-04 11:30:26 +02:00
|
|
|
all_files_are_containers =
|
|
|
|
param.GetBlockValue("all_files_are_containers", true);
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2013-08-04 11:30:26 +02:00
|
|
|
filter_setting = param.GetBlockValue("filter", true);
|
2009-09-26 02:20:17 +02:00
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-07-30 11:33:06 +02:00
|
|
|
static void
|
2009-08-30 19:48:56 +02:00
|
|
|
sidplay_finish()
|
|
|
|
{
|
2014-12-04 21:29:49 +01:00
|
|
|
delete songlength_database;
|
2009-08-30 19:48:56 +02:00
|
|
|
}
|
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
struct SidplayContainerPath {
|
|
|
|
AllocatedPath path;
|
|
|
|
unsigned track;
|
|
|
|
};
|
|
|
|
|
|
|
|
gcc_pure
|
|
|
|
static unsigned
|
|
|
|
ParseSubtuneName(const char *base)
|
2009-08-30 19:48:56 +02:00
|
|
|
{
|
2014-12-04 21:11:33 +01:00
|
|
|
if (memcmp(base, SUBTUNE_PREFIX, sizeof(SUBTUNE_PREFIX) - 1) != 0)
|
|
|
|
return 0;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
base += sizeof(SUBTUNE_PREFIX) - 1;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
char *endptr;
|
|
|
|
auto track = strtoul(base, &endptr, 10);
|
|
|
|
if (endptr == base || *endptr != '.')
|
|
|
|
return 0;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
return track;
|
2009-08-30 19:48:56 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-12-04 21:11:33 +01:00
|
|
|
* returns the file path stripped of any /tune_xxx.* subtune suffix
|
|
|
|
* and the track number (or 1 if no "tune_xxx" suffix is present).
|
2009-08-30 19:48:56 +02:00
|
|
|
*/
|
2014-12-04 21:11:33 +01:00
|
|
|
static SidplayContainerPath
|
|
|
|
ParseContainerPath(Path path_fs)
|
2009-08-30 19:48:56 +02:00
|
|
|
{
|
2014-12-04 21:11:33 +01:00
|
|
|
const Path base = path_fs.GetBase();
|
|
|
|
unsigned track;
|
|
|
|
if (base.IsNull() ||
|
|
|
|
(track = ParseSubtuneName(base.c_str())) < 1)
|
|
|
|
return { AllocatedPath(path_fs), 1 };
|
|
|
|
|
|
|
|
return { path_fs.GetDirectoryName(), track };
|
2009-08-30 19:48:56 +02:00
|
|
|
}
|
|
|
|
|
2009-08-30 19:49:04 +02:00
|
|
|
/* get the song length in seconds */
|
2014-08-29 20:52:39 +02:00
|
|
|
static SignedSongTime
|
2014-12-04 21:58:09 +01:00
|
|
|
get_song_length(SidTuneMod &tune)
|
2009-08-30 19:49:04 +02:00
|
|
|
{
|
2014-12-04 21:58:09 +01:00
|
|
|
assert(tune);
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2014-12-04 21:58:09 +01:00
|
|
|
if (songlength_database == nullptr)
|
2014-08-29 20:52:39 +02:00
|
|
|
return SignedSongTime::Negative();
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2014-12-04 21:52:31 +01:00
|
|
|
const auto length = songlength_database->length(tune);
|
2014-12-04 21:29:49 +01:00
|
|
|
if (length < 0)
|
2014-08-29 20:52:39 +02:00
|
|
|
return SignedSongTime::Negative();
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2014-12-04 21:29:49 +01:00
|
|
|
return SignedSongTime::FromS(length);
|
2009-08-30 19:49:04 +02:00
|
|
|
}
|
|
|
|
|
2009-02-11 20:31:17 +01:00
|
|
|
static void
|
2014-02-07 18:52:19 +01:00
|
|
|
sidplay_file_decode(Decoder &decoder, Path path_fs)
|
2009-02-11 20:31:17 +01:00
|
|
|
{
|
2010-10-27 21:16:24 +02:00
|
|
|
int channels;
|
2009-02-11 20:31:17 +01:00
|
|
|
|
|
|
|
/* load the tune */
|
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
const auto container = ParseContainerPath(path_fs);
|
2014-12-04 21:58:09 +01:00
|
|
|
SidTuneMod tune(container.path.c_str());
|
2016-07-29 16:58:15 +02:00
|
|
|
if (!tune.getStatus()) {
|
2016-07-29 16:59:17 +02:00
|
|
|
FormatWarning(sidplay_domain, "failed to load file: %s",
|
|
|
|
tune.getInfo().statusString);
|
2009-02-11 20:31:17 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-12-04 21:11:33 +01:00
|
|
|
const int song_num = container.track;
|
2009-08-30 19:48:56 +02:00
|
|
|
tune.selectSong(song_num);
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2014-12-04 21:58:09 +01:00
|
|
|
auto duration = get_song_length(tune);
|
2014-08-29 20:52:39 +02:00
|
|
|
if (duration.IsNegative() && default_songlength > 0)
|
|
|
|
duration = SongTime::FromS(default_songlength);
|
2009-08-30 19:49:16 +02:00
|
|
|
|
2009-02-11 20:31:17 +01:00
|
|
|
/* initialize the player */
|
|
|
|
|
|
|
|
sidplay2 player;
|
|
|
|
int iret = player.load(&tune);
|
|
|
|
if (iret != 0) {
|
2013-09-27 22:31:24 +02:00
|
|
|
FormatWarning(sidplay_domain,
|
|
|
|
"sidplay2.load() failed: %s", player.error());
|
2009-02-11 20:31:17 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* initialize the builder */
|
|
|
|
|
|
|
|
ReSIDBuilder builder("ReSID");
|
|
|
|
builder.create(player.info().maxsids);
|
|
|
|
if (!builder) {
|
2016-07-29 16:59:17 +02:00
|
|
|
FormatWarning(sidplay_domain, "ReSIDBuilder.create() failed: %s",
|
|
|
|
builder.error());
|
2009-02-11 20:31:17 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2009-09-26 02:20:17 +02:00
|
|
|
builder.filter(filter_setting);
|
2009-02-11 20:31:17 +01:00
|
|
|
if (!builder) {
|
2016-07-29 16:59:17 +02:00
|
|
|
FormatWarning(sidplay_domain, "ReSIDBuilder.filter() failed: %s",
|
|
|
|
builder.error());
|
2009-02-11 20:31:17 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* configure the player */
|
|
|
|
|
|
|
|
sid2_config_t config = player.config();
|
|
|
|
|
|
|
|
config.clockDefault = SID2_CLOCK_PAL;
|
|
|
|
config.clockForced = true;
|
|
|
|
config.clockSpeed = SID2_CLOCK_CORRECT;
|
|
|
|
config.frequency = 48000;
|
|
|
|
config.optimisation = SID2_DEFAULT_OPTIMISATION;
|
2010-10-27 21:16:24 +02:00
|
|
|
|
2009-02-11 20:31:17 +01:00
|
|
|
config.precision = 16;
|
|
|
|
config.sidDefault = SID2_MOS6581;
|
|
|
|
config.sidEmulation = &builder;
|
|
|
|
config.sidModel = SID2_MODEL_CORRECT;
|
|
|
|
config.sidSamples = true;
|
2013-10-16 21:09:19 +02:00
|
|
|
config.sampleFormat = IsLittleEndian()
|
|
|
|
? SID2_LITTLE_SIGNED
|
|
|
|
: SID2_BIG_SIGNED;
|
2010-10-27 21:16:24 +02:00
|
|
|
if (tune.isStereo()) {
|
|
|
|
config.playback = sid2_stereo;
|
|
|
|
channels = 2;
|
|
|
|
} else {
|
|
|
|
config.playback = sid2_mono;
|
|
|
|
channels = 1;
|
|
|
|
}
|
2009-02-11 20:31:17 +01:00
|
|
|
|
|
|
|
iret = player.config(config);
|
|
|
|
if (iret != 0) {
|
2013-09-27 22:31:24 +02:00
|
|
|
FormatWarning(sidplay_domain,
|
|
|
|
"sidplay2.config() failed: %s", player.error());
|
2009-02-11 20:31:17 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* initialize the MPD decoder */
|
|
|
|
|
2013-08-03 21:00:50 +02:00
|
|
|
const AudioFormat audio_format(48000, SampleFormat::S16, channels);
|
|
|
|
assert(audio_format.IsValid());
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2014-08-29 20:52:39 +02:00
|
|
|
decoder_initialized(decoder, audio_format, true, duration);
|
2009-02-11 20:31:17 +01:00
|
|
|
|
|
|
|
/* .. and play */
|
|
|
|
|
2009-11-14 00:15:04 +01:00
|
|
|
const unsigned timebase = player.timebase();
|
2014-08-29 20:52:39 +02:00
|
|
|
const unsigned end = duration.IsNegative()
|
|
|
|
? 0u
|
|
|
|
: duration.ToScale<uint64_t>(timebase);
|
2009-11-14 00:15:04 +01:00
|
|
|
|
2013-09-27 12:11:37 +02:00
|
|
|
DecoderCommand cmd;
|
2009-02-11 20:31:17 +01:00
|
|
|
do {
|
|
|
|
char buffer[4096];
|
|
|
|
size_t nbytes;
|
|
|
|
|
|
|
|
nbytes = player.play(buffer, sizeof(buffer));
|
|
|
|
if (nbytes == 0)
|
|
|
|
break;
|
|
|
|
|
2009-12-25 19:47:33 +01:00
|
|
|
decoder_timestamp(decoder, (double)player.time() / timebase);
|
|
|
|
|
2013-10-19 18:19:03 +02:00
|
|
|
cmd = decoder_data(decoder, nullptr, buffer, nbytes, 0);
|
2009-08-30 19:49:16 +02:00
|
|
|
|
2013-09-27 12:11:37 +02:00
|
|
|
if (cmd == DecoderCommand::SEEK) {
|
2009-12-25 19:47:33 +01:00
|
|
|
unsigned data_time = player.time();
|
2014-08-26 21:52:28 +02:00
|
|
|
unsigned target_time =
|
|
|
|
decoder_seek_time(decoder).ToScale(timebase);
|
2009-08-30 19:49:16 +02:00
|
|
|
|
|
|
|
/* can't rewind so return to zero and seek forward */
|
|
|
|
if(target_time<data_time) {
|
|
|
|
player.stop();
|
|
|
|
data_time=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ignore data until target time is reached */
|
|
|
|
while(data_time<target_time) {
|
|
|
|
nbytes=player.play(buffer, sizeof(buffer));
|
|
|
|
if(nbytes==0)
|
|
|
|
break;
|
2009-11-14 00:15:04 +01:00
|
|
|
data_time = player.time();
|
2009-08-30 19:49:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
decoder_command_finished(decoder);
|
|
|
|
}
|
|
|
|
|
2014-08-29 20:52:39 +02:00
|
|
|
if (end > 0 && player.time() >= end)
|
2009-08-30 19:49:16 +02:00
|
|
|
break;
|
|
|
|
|
2013-09-27 12:11:37 +02:00
|
|
|
} while (cmd != DecoderCommand::STOP);
|
2009-02-11 20:31:17 +01:00
|
|
|
}
|
|
|
|
|
2016-07-29 17:36:32 +02:00
|
|
|
gcc_pure
|
|
|
|
static const char *
|
|
|
|
GetInfoString(const SidTuneInfo &info, unsigned i)
|
|
|
|
{
|
|
|
|
return info.numberOfInfoStrings > i
|
|
|
|
? info.infoString[i]
|
|
|
|
: nullptr;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
static bool
|
2014-02-07 18:52:19 +01:00
|
|
|
sidplay_scan_file(Path path_fs,
|
2012-02-11 19:12:02 +01:00
|
|
|
const struct tag_handler *handler, void *handler_ctx)
|
2009-02-11 20:31:17 +01:00
|
|
|
{
|
2014-12-04 21:11:33 +01:00
|
|
|
const auto container = ParseContainerPath(path_fs);
|
|
|
|
const unsigned song_num = container.track;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2014-12-04 21:58:09 +01:00
|
|
|
SidTuneMod tune(container.path.c_str());
|
2016-07-29 17:31:25 +02:00
|
|
|
if (!tune.getStatus())
|
2012-02-11 19:12:02 +01:00
|
|
|
return false;
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2014-12-04 21:58:09 +01:00
|
|
|
tune.selectSong(song_num);
|
|
|
|
|
2009-02-11 20:31:17 +01:00
|
|
|
const SidTuneInfo &info = tune.getInfo();
|
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
/* title */
|
2016-07-29 17:36:32 +02:00
|
|
|
const char *title = GetInfoString(info, 0);
|
|
|
|
if (title == nullptr)
|
|
|
|
title = "";
|
2009-08-30 19:48:56 +02:00
|
|
|
|
|
|
|
if(info.songs>1) {
|
2013-10-19 17:15:17 +02:00
|
|
|
char tag_title[1024];
|
|
|
|
snprintf(tag_title, sizeof(tag_title),
|
|
|
|
"%s (%d/%d)",
|
|
|
|
title, song_num, info.songs);
|
2012-02-11 19:12:02 +01:00
|
|
|
tag_handler_invoke_tag(handler, handler_ctx,
|
|
|
|
TAG_TITLE, tag_title);
|
2009-08-30 19:48:56 +02:00
|
|
|
} else
|
2012-02-11 19:12:02 +01:00
|
|
|
tag_handler_invoke_tag(handler, handler_ctx, TAG_TITLE, title);
|
2009-08-30 19:48:56 +02:00
|
|
|
|
|
|
|
/* artist */
|
2016-07-29 17:36:32 +02:00
|
|
|
const char *artist = GetInfoString(info, 1);
|
|
|
|
if (artist != nullptr)
|
2012-02-11 19:12:02 +01:00
|
|
|
tag_handler_invoke_tag(handler, handler_ctx, TAG_ARTIST,
|
2016-07-29 17:36:32 +02:00
|
|
|
artist);
|
2009-02-11 20:31:17 +01:00
|
|
|
|
2016-07-29 17:47:08 +02:00
|
|
|
/* date */
|
|
|
|
const char *date = GetInfoString(info, 2);
|
|
|
|
if (date != nullptr)
|
|
|
|
tag_handler_invoke_tag(handler, handler_ctx, TAG_DATE,
|
|
|
|
date);
|
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
/* track */
|
2013-10-19 17:15:17 +02:00
|
|
|
char track[16];
|
|
|
|
sprintf(track, "%d", song_num);
|
2012-02-11 19:12:02 +01:00
|
|
|
tag_handler_invoke_tag(handler, handler_ctx, TAG_TRACK, track);
|
2009-08-30 19:48:56 +02:00
|
|
|
|
2009-08-30 19:49:04 +02:00
|
|
|
/* time */
|
2014-12-04 21:58:09 +01:00
|
|
|
const auto duration = get_song_length(tune);
|
2014-08-29 20:52:39 +02:00
|
|
|
if (!duration.IsNegative())
|
|
|
|
tag_handler_invoke_duration(handler, handler_ctx,
|
2014-08-29 22:43:36 +02:00
|
|
|
SongTime(duration));
|
2009-08-30 19:49:04 +02:00
|
|
|
|
2012-02-11 19:12:02 +01:00
|
|
|
return true;
|
2009-02-11 20:31:17 +01:00
|
|
|
}
|
|
|
|
|
2009-08-30 19:48:56 +02:00
|
|
|
static char *
|
2014-02-07 18:52:19 +01:00
|
|
|
sidplay_container_scan(Path path_fs, const unsigned int tnum)
|
2009-08-30 19:48:56 +02:00
|
|
|
{
|
2014-02-07 18:52:19 +01:00
|
|
|
SidTune tune(path_fs.c_str(), nullptr, true);
|
2009-08-30 19:48:56 +02:00
|
|
|
if (!tune)
|
2013-10-19 18:19:03 +02:00
|
|
|
return nullptr;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
|
|
|
const SidTuneInfo &info=tune.getInfo();
|
|
|
|
|
|
|
|
/* Don't treat sids containing a single tune
|
|
|
|
as containers */
|
|
|
|
if(!all_files_are_containers && info.songs<2)
|
2013-10-19 18:19:03 +02:00
|
|
|
return nullptr;
|
2009-08-30 19:48:56 +02:00
|
|
|
|
|
|
|
/* Construct container/tune path names, eg.
|
|
|
|
Delta.sid/tune_001.sid */
|
|
|
|
if(tnum<=info.songs) {
|
2014-02-24 19:38:30 +01:00
|
|
|
return FormatNew(SUBTUNE_PREFIX "%03u.sid", tnum);
|
2009-08-30 19:48:56 +02:00
|
|
|
} else
|
2013-10-19 18:19:03 +02:00
|
|
|
return nullptr;
|
2009-08-30 19:48:56 +02:00
|
|
|
}
|
|
|
|
|
2009-02-11 20:31:17 +01:00
|
|
|
static const char *const sidplay_suffixes[] = {
|
|
|
|
"sid",
|
2010-10-27 21:18:43 +02:00
|
|
|
"mus",
|
|
|
|
"str",
|
|
|
|
"prg",
|
|
|
|
"P00",
|
2013-10-19 18:19:03 +02:00
|
|
|
nullptr
|
2009-02-11 20:31:17 +01:00
|
|
|
};
|
|
|
|
|
2013-10-21 20:31:34 +02:00
|
|
|
extern const struct DecoderPlugin sidplay_decoder_plugin;
|
|
|
|
const struct DecoderPlugin sidplay_decoder_plugin = {
|
2009-02-11 20:31:17 +01:00
|
|
|
"sidplay",
|
2009-08-30 19:48:56 +02:00
|
|
|
sidplay_init,
|
|
|
|
sidplay_finish,
|
2013-10-19 18:19:03 +02:00
|
|
|
nullptr, /* stream_decode() */
|
2009-02-11 20:31:17 +01:00
|
|
|
sidplay_file_decode,
|
2012-02-11 19:12:02 +01:00
|
|
|
sidplay_scan_file,
|
2013-10-19 18:19:03 +02:00
|
|
|
nullptr, /* stream_tag() */
|
2009-08-30 19:48:56 +02:00
|
|
|
sidplay_container_scan,
|
2009-02-11 20:31:17 +01:00
|
|
|
sidplay_suffixes,
|
2013-10-19 18:19:03 +02:00
|
|
|
nullptr, /* mime_types */
|
2009-02-11 20:31:17 +01:00
|
|
|
};
|