Commit 3f10d194 authored by Alf Gaida's avatar Alf Gaida

New upstream version 3.10

parent 4de0719a
language:
- cpp
compiler:
- gcc
- clang
before_install:
- sudo apt-get -qq update
- sudo apt-get install libgtk2.0-dev qtbase5-dev qtmultimedia5-dev
- sudo apt-get install libasound2-dev libavformat-dev libbinio-dev libbs2b-dev
- sudo apt-get install libcddb2-dev libcdio-cdda-dev libcue-dev libcurl4-gnutls-dev
- sudo apt-get install libdbus-glib-1-dev libfaad-dev libflac-dev libfluidsynth-dev
- sudo apt-get install libgl1-mesa-dev libjack-jackd2-dev liblircclient-dev
- sudo apt-get install libmms-dev libmodplug-dev libmp3lame-dev libmpg123-dev
- sudo apt-get install libneon27-gnutls-dev libnotify-dev libpulse-dev
- sudo apt-get install libsamplerate0-dev libsdl1.2-dev libsidplayfp-dev
- sudo apt-get install libsndfile1-dev libsoxr-dev libvorbis-dev libwavpack-dev
- sudo apt-get install libxml2-dev libadplug-dev
install:
- git clone git://github.com/audacious-media-player/audacious.git audacious
- cd audacious
- ./autogen.sh
- ./configure --prefix=/opt/aud --enable-qt
- make
- sudo make install
- cd ..
script:
- export PKG_CONFIG_PATH=/opt/aud/lib/pkgconfig
- ./autogen.sh
- ./configure --prefix=/opt/aud --enable-qt
- make
......@@ -83,8 +83,8 @@ AC_REQUIRE([AC_SYS_LARGEFILE])
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
if test "x$HAVE_DARWIN" = "xyes"; then
CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
LDFLAGS="$LDFLAGS"
else
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
fi
......@@ -101,7 +101,7 @@ if test "x$HAVE_DARWIN" = "xyes"; then
AC_PROG_OBJCXX
AC_PROG_OBJCXXCPP
OBJCXXFLAGS="$OBJCXXFLAGS -stdlib=libc++ -std=c++11"
OBJCXXFLAGS="$OBJCXXFLAGS -std=c++11"
fi
dnl Enable "-Wl,-z,defs" only on Linux
......
This diff is collapsed.
This diff is collapsed.
......@@ -5,8 +5,8 @@ dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([audacious-plugins], [3.9])
AC_COPYRIGHT([Copyright (C) 2001-2017 Audacious developers and others])
AC_INIT([audacious-plugins], [3.10])
AC_COPYRIGHT([Copyright (C) 2001-2018 Audacious developers and others])
AC_DEFINE_UNQUOTED([PACKAGE], "$PACKAGE_NAME", [Name of package])
AC_DEFINE_UNQUOTED([VERSION], "$PACKAGE_VERSION", [Version number of package])
......@@ -17,6 +17,7 @@ AC_CONFIG_MACRO_DIR([m4])
AUD_COMMON_PROGS
BUILDSYS_INIT
BUILDSYS_SHARED_LIB
dnl gettext
......@@ -31,9 +32,9 @@ LIBS="$LIBS $LIBINTL"
dnl Check for Audacious
dnl ===================
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 3.9],
PKG_CHECK_MODULES(AUDACIOUS, [audacious >= 3.10],
[],
[AC_MSG_ERROR([Cannot find Audacious 3.9; have you installed Audacious yet?])]
[AC_MSG_ERROR([Cannot find Audacious 3.10; have you installed Audacious yet?])]
)
CPPFLAGS="$CPPFLAGS $AUDACIOUS_CFLAGS"
......@@ -63,7 +64,7 @@ fi
dnl Default Set of Plugins
dnl ======================
INPUT_PLUGINS="adplug metronom psf tonegen vtx xsf"
INPUT_PLUGINS="metronom psf tonegen vtx xsf"
OUTPUT_PLUGINS=""
EFFECT_PLUGINS="compressor crossfade crystalizer mixer silence-removal stereo_plugin voice_removal echo_plugin"
GENERAL_PLUGINS=""
......@@ -106,6 +107,12 @@ check_allowed () {
if test $plugin_allowed = no -a $2 = yes ; then
AC_MSG_ERROR([--enable-$1 cannot be used without --enable-qt])
fi
if test $plugin_allowed = yes -a $1 = ampache ; then
plugin_allowed=$have_neon
if test $plugin_allowed = no -a $2 = yes ; then
AC_MSG_ERROR([--enable-$1 cannot be used without --enable-neon])
fi
fi
;;
*)
plugin_allowed=yes
......@@ -174,6 +181,13 @@ AC_DEFUN([ENABLE_PLUGIN_WITH_TEST], [
dnl Optional Plugins
dnl ================
ENABLE_PLUGIN_WITH_DEP(adplug,
AdLib support,
auto,
INPUT,
ADLIB,
adplug)
ENABLE_PLUGIN_WITH_DEP(cdaudio,
audio CD support,
auto,
......@@ -373,13 +387,6 @@ ENABLE_PLUGIN_WITH_DEP(mms,
MMS,
libmms >= 0.3)
ENABLE_PLUGIN_WITH_DEP(gnomeshortcuts,
GNOME shortcuts,
auto,
GENERAL,
DBUS,
dbus-1 >= 0.60 dbus-glib-1 >= 0.60)
ENABLE_PLUGIN_WITH_DEP(notify,
libnotify OSD,
auto,
......@@ -703,7 +710,7 @@ echo " libsndfile: $have_sndfile"
echo
echo " Chiptunes"
echo " ---------"
echo " AdLib synthesizer (adplug): yes"
echo " AdLib synthesizer (adplug): $have_adplug"
echo " Commodore 64 audio (sid): $have_sid"
echo " Game Music Emu (spc, nsf, gbs, etc.): $have_console"
echo " ModPlug: $have_modplug"
......@@ -765,7 +772,6 @@ echo " -------"
echo " Alarm (requires GTK+): $USE_GTK"
echo " Ampache browser (requires Qt): $have_ampache"
echo " Delete Files: $USE_GTK_OR_QT"
echo " GNOME Shortcuts: $have_gnomeshortcuts"
echo " libnotify OSD: $have_notify"
echo " Linux Infrared Remote Control (LIRC): $have_lirc"
echo " MPRIS 2 Server: $have_mpris2"
......
......@@ -19,6 +19,8 @@ VISUALIZATION_PLUGIN_DIR ?= @VISUALIZATION_PLUGIN_DIR@
USE_GTK ?= @USE_GTK@
USE_QT ?= @USE_QT@
ADLIB_CFLAGS ?= @ADLIB_CFLAGS@
ADLIB_LIBS ?= @ADLIB_LIBS@
ALSA_CFLAGS ?= @ALSA_CFLAGS@
ALSA_LIBS ?= @ALSA_LIBS@
AMPACHE_CFLAGS ?= @AMPACHE_CFLAGS@
......@@ -31,8 +33,6 @@ CUE_CFLAGS ?= @CUE_CFLAGS@
CUE_LIBS ?= @CUE_LIBS@
CURL_CFLAGS ?= @CURL_CFLAGS@
CURL_LIBS ?= @CURL_LIBS@
DBUS_CFLAGS ?= @DBUS_CFLAGS@
DBUS_LIBS ?= @DBUS_LIBS@
FFMPEG_CFLAGS ?= @FFMPEG_CFLAGS@
FFMPEG_LIBS ?= @FFMPEG_LIBS@
FILEWRITER_CFLAGS ?= @FILEWRITER_CFLAGS@
......
This diff is collapsed.
......@@ -61,7 +61,7 @@ update-pot:
@echo Updating $(POTTEMPLATE) ...
xgettext --default-domain=$(PACKAGE_NAME) --language=C \
--keyword=_ --keyword=N_ --from-code="utf-8" \
--msgid-bugs-address="http://redmine.audacious-media-player.org/" \
--msgid-bugs-address="https://redmine.audacious-media-player.org/" \
--directory=.. --files-from=POTFILES.in -o $(POTTEMPLATE)
update-po: update-pot
......
# Please don't update this file manually - use ./update-potfiles.sh instead!
src/aac/aac.cc
src/adplug/adplug-xmms.cc
src/adplug/core/rix.cc
src/adplug/core/rix.h
src/alarm/alarm.cc
src/alarm/interface.cc
src/albumart/albumart.cc
......@@ -95,7 +93,6 @@ src/flac/metadata.cc
src/flac/plugin.cc
src/gio/gio.cc
src/glspectrum/gl-spectrum.cc
src/gnomeshortcuts/gnomeshortcuts.cc
src/gtkui/columns.cc
src/gtkui/layout.cc
src/gtkui/menus.cc
......@@ -156,15 +153,15 @@ src/skins/actions.cc
src/skins/equalizer.cc
src/skins/main.cc
src/skins/menus.cc
src/skins/playlist.cc
src/skins/playlist-widget.cc
src/skins/playlistwin.cc
src/skins/plugin.cc
src/skins-qt/actions.cc
src/skins-qt/equalizer.cc
src/skins-qt/main.cc
src/skins-qt/menus.cc
src/skins-qt/playlist.cc
src/skins-qt/playlist-widget.cc
src/skins-qt/playlistwin.cc
src/skins-qt/plugin.cc
src/skins-qt/skins_cfg.cc
src/skins-qt/skinselector.cc
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
PLUGIN = adplug${PLUGIN_SUFFIX}
SRCS = adplug-xmms.cc \
binio/binfile.cc \
binio/binio.cc \
binio/binstr.cc \
core/fmopl.cc \
core/adlibemu.cc \
core/adplug.cc \
core/emuopl.cc \
core/fprovide.cc \
core/player.cc \
core/database.cc \
core/hsc.cc \
core/sng.cc \
core/imf.cc \
core/players.cc \
core/protrack.cc \
core/a2m.cc \
core/adtrack.cc \
core/amd.cc \
core/bam.cc \
core/cmf.cc \
core/d00.cc \
core/dfm.cc \
core/dmo.cc \
core/hsp.cc \
core/ksm.cc \
core/mad.cc \
core/mid.cc \
core/mkj.cc \
core/cff.cc \
core/dtm.cc \
core/fmc.cc \
core/mtk.cc \
core/rad.cc \
core/raw.cc \
core/sa2.cc \
core/s3m.cc \
core/xad.cc \
core/flash.cc \
core/bmf.cc \
core/hybrid.cc \
core/hyp.cc \
core/psi.cc \
core/rat.cc \
core/u6m.cc \
core/rol.cc \
core/xsm.cc \
core/dro.cc \
core/dro2.cc \
core/lds.cc \
core/temuopl.cc \
core/msc.cc \
core/rix.cc \
core/adl.cc \
core/jbm.cc
SRCS = adplug-xmms.cc
include ../../buildsys.mk
include ../../extra.mk
......@@ -65,4 +11,5 @@ LD = ${CXX}
CFLAGS += ${PLUGIN_CFLAGS}
# FIXME: Turning off warnings for now; this code is awful
CXXFLAGS += ${PLUGIN_CFLAGS} -Wno-sign-compare -Wno-shift-negative-value
CPPFLAGS += ${PLUGIN_CPPFLAGS} -I../.. -I./core -I./binio
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${ADLIB_CFLAGS} -I../..
LIBS += ${ADLIB_LIBS}
......@@ -23,24 +23,34 @@
#include <stdio.h>
#include <string.h>
#include "adplug.h"
#include "emuopl.h"
#include "silentopl.h"
#include "players.h"
#include <adplug/adplug.h>
#include <adplug/emuopl.h>
#include <adplug/silentopl.h>
#include <adplug/players.h>
#include <libaudcore/audstrings.h>
#include <libaudcore/i18n.h>
#include <libaudcore/plugin.h>
#include <libaudcore/runtime.h>
#include <libaudcore/preferences.h>
#include "adplug-xmms.h"
#define CFG_ID "AdPlug"
class AdPlugXMMS : public InputPlugin
{
public:
static const char * const exts[];
static const char * const defaults[];
static const PreferencesWidget widgets[];
static const PluginPreferences prefs;
static constexpr PluginInfo info = {
N_("AdPlug (AdLib Player)"),
PACKAGE
PACKAGE,
nullptr,
& prefs
};
constexpr AdPlugXMMS () : InputPlugin (info, InputInfo ()
......@@ -80,12 +90,6 @@ const char * const AdPlugXMMS::exts[] = {
/***** Global variables *****/
// Configuration (and defaults)
static struct {
int freq = 44100l;
bool bit16 = true, stereo = false, endless = false;
} conf;
// Player variables
static struct {
CPlayer *p = nullptr;
......@@ -126,8 +130,8 @@ bool AdPlugXMMS::read_tag (const char * filename, VFSFile & file, Tuple & tuple,
{
CSilentopl tmpopl;
CFileProvider fp (file);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, fp);
CFileVFSProvider fp (file);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, CAdPlug::players, fp);
if (! p)
return false;
......@@ -153,24 +157,29 @@ bool AdPlugXMMS::play (const char * filename, VFSFile & fd)
{
dbg_printf ("adplug_play(\"%s\"): ", filename);
bool bit16 = aud_get_bool (CFG_ID, "16bit");
bool stereo = aud_get_bool (CFG_ID, "Stereo");
int freq = aud_get_int (CFG_ID, "Frequency");
bool endless = aud_get_bool (CFG_ID, "Endless");
// Set XMMS main window information
dbg_printf ("xmms, ");
int sampsize = (conf.bit16 ? 2 : 1) * (conf.stereo ? 2 : 1);
set_stream_bitrate (conf.freq * sampsize * 8);
int sampsize = (bit16 ? 2 : 1) * (stereo ? 2 : 1);
set_stream_bitrate (freq * sampsize * 8);
// open output plugin
dbg_printf ("open, ");
open_audio (conf.bit16 ? FORMAT_16 : FORMAT_8, conf.freq, conf.stereo ? 2 : 1);
open_audio (bit16 ? FORMAT_16 : FORMAT_8, freq, stereo ? 2 : 1);
CEmuopl opl (conf.freq, conf.bit16, conf.stereo);
CEmuopl opl (freq, bit16, stereo);
long toadd = 0, i, towrite;
char *sndbuf, *sndbufpos;
bool playing = true; // Song self-end indicator.
// Try to load module
dbg_printf ("factory, ");
CFileProvider fp (fd);
if (!(plr.p = CAdPlug::factory (filename, &opl, fp)))
CFileVFSProvider fp (fd);
if (!(plr.p = CAdPlug::factory (filename, &opl, CAdPlug::players, fp)))
{
dbg_printf ("error!\n");
// MessageBox("AdPlug :: Error", "File could not be opened!", "Ok");
......@@ -197,7 +206,7 @@ bool AdPlugXMMS::play (const char * filename, VFSFile & fd)
// main playback loop
dbg_printf ("loop.\n");
while ((playing || conf.endless))
while ((playing || endless))
{
if (check_stop ())
break;
......@@ -226,7 +235,7 @@ bool AdPlugXMMS::play (const char * filename, VFSFile & fd)
{
while (toadd < 0)
{
toadd += conf.freq;
toadd += freq;
playing = plr.p->update ();
if (playing)
time += (int) (1000 / plr.p->getrefresh ());
......@@ -259,8 +268,8 @@ bool AdPlugXMMS::is_our_file (const char * filename, VFSFile & fd)
{
CSilentopl tmpopl;
CFileProvider fp (fd);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, fp);
CFileVFSProvider fp (fd);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, CAdPlug::players, fp);
dbg_printf ("adplug_is_our_file(\"%s\"): returned ", filename);
......@@ -277,23 +286,31 @@ bool AdPlugXMMS::is_our_file (const char * filename, VFSFile & fd)
/***** Configuration file handling *****/
#define CFG_VERSION "AdPlug"
static const char * const adplug_defaults[] = {
const char * const AdPlugXMMS::defaults[] = {
"16bit", "TRUE",
"Stereo", "FALSE",
"Frequency", "44100",
"Endless", "FALSE",
nullptr};
const PreferencesWidget AdPlugXMMS::widgets[] = {
WidgetLabel (N_("<b>Output</b>")),
WidgetCheck (N_("16-bit output (if unchecked, output is 8-bit)"),
WidgetBool (CFG_ID, "16bit")),
WidgetCheck (N_("Duplicate mono output to two channels"),
WidgetBool (CFG_ID, "Stereo")),
WidgetSpin (N_("Sample rate"),
WidgetInt (CFG_ID, "Frequency"), {8000, 192000, 50, N_("Hz")}),
WidgetLabel (N_("<b>Miscellaneous</b>")),
WidgetCheck (N_("Repeat song in endless loop"),
WidgetBool (CFG_ID, "Endless"))
};
const PluginPreferences AdPlugXMMS::prefs = {{widgets}};
bool AdPlugXMMS::init ()
{
aud_config_set_defaults (CFG_VERSION, adplug_defaults);
conf.bit16 = aud_get_bool (CFG_VERSION, "16bit");
conf.stereo = aud_get_bool (CFG_VERSION, "Stereo");
conf.freq = aud_get_int (CFG_VERSION, "Frequency");
conf.endless = aud_get_bool (CFG_VERSION, "Endless");
aud_config_set_defaults (CFG_ID, defaults);
// Load database from disk and hand it to AdPlug
dbg_printf ("database");
......@@ -327,9 +344,4 @@ void AdPlugXMMS::cleanup ()
delete plr.db;
plr.filename = String ();
aud_set_bool (CFG_VERSION, "16bit", conf.bit16);
aud_set_bool (CFG_VERSION, "Stereo", conf.stereo);
aud_set_int (CFG_VERSION, "Frequency", conf.freq);
aud_set_bool (CFG_VERSION, "Endless", conf.endless);
}
/*
AdPlug/XMMS - AdPlug XMMS Plugin
Copyright (C) 2002, 2003 Simon Peter <dn.tlp@gmx.net>
AdPlug/XMMS is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This plugin 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this plugin; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ADPLUG_XMMS_H
#define ADPLUG_XMMS_H
#include <libbinio/binio.h>
#include <adplug/fprovide.h>
#include <libaudcore/vfs.h>
class vfsistream : public binistream
{
public:
vfsistream(VFSFile *fd = nullptr) :
fd(fd) {}
vfsistream(std::string &file)
{
if ((own = VFSFile(file.c_str(), "r")))
fd = &own;
else
err |= NotFound;
}
Byte getByte()
{
Byte b = (Byte)-1;
if (fd->fread(&b, 1, 1) != 1)
err |= Eof;
return b;
}
void seek(long pos, Offset offs = Set)
{
VFSSeekType wh = (offs == Add) ? VFS_SEEK_CUR : (offs == End) ? VFS_SEEK_END : VFS_SEEK_SET;
if (fd->fseek (pos, wh))
err |= Eof;
}
long pos()
{
return fd->ftell ();
}
unsigned long size()
{
return aud::max(fd->fsize(), (int64_t)0);
}
private:
VFSFile *fd = nullptr;
VFSFile own;
};
class CFileVFSProvider : public CFileProvider
{
public:
CFileVFSProvider(VFSFile &file) :
m_file(file) {}
binistream *open(std::string filename) const
{
binistream *f;
if (!strcmp(filename.c_str(), m_file.filename()) && !m_file.fseek(0, VFS_SEEK_SET))
f = new vfsistream(&m_file);
else
f = new vfsistream(filename);
if(f->error()) { delete f; return 0; }
// Open all files as little endian with IEEE floats by default
f->setFlag(binio::BigEndian, false); f->setFlag(binio::FloatIEEE);