Commit 26646e34 authored by Mateusz Łukasik's avatar Mateusz Łukasik

Imported Upstream version 3.7.1

parent 35d79008
......@@ -81,12 +81,12 @@ AC_REQUIRE([AC_C_BIGENDIAN])
AC_REQUIRE([AC_SYS_LARGEFILE])
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe"
CFLAGS="$CFLAGS -std=gnu99 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
if test "x$HAVE_DARWIN" = "xyes"; then
CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
else
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
fi
AUD_CHECK_CFLAGS(-Wtype-limits)
AUD_CHECK_CXXFLAGS(-Woverloaded-virtual)
......@@ -107,13 +107,13 @@ fi
dnl Enable "-Wl,-z,defs" only on Linux
dnl ==================================
if test $HAVE_LINUX = yes ; then
LDFLAGS="$LDFLAGS -Wl,-z,defs"
LDFLAGS="$LDFLAGS -Wl,-z,defs"
fi
dnl MinGW needs -march=i686 for atomics
dnl ===================================
if test $HAVE_MSWINDOWS = yes ; then
CFLAGS="$CFLAGS -march=i686"
CFLAGS="$CFLAGS -march=i686"
fi
dnl Byte order
......@@ -173,7 +173,7 @@ AC_SUBST(USE_GTK)
if test $HAVE_MSWINDOWS = yes ; then
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.32)
else
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.32 gio-unix-2.0 >= 2.32)
PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.32 gio-unix-2.0 >= 2.32)
fi
AC_SUBST(GLIB_CFLAGS)
......@@ -193,7 +193,7 @@ AC_ARG_ENABLE(qt,
USE_QT=$enableval, USE_QT=no)
if test $USE_QT = yes ; then
PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets])
PKG_CHECK_MODULES([QT], [Qt5Core Qt5Gui Qt5Widgets >= 5.2])
AC_DEFINE(USE_QT, 1, [Define if Qt support enabled])
# needed if Qt was built with -reduce-relocations
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,8 +21,6 @@ USE_QT ?= @USE_QT@
ALSA_CFLAGS ?= @ALSA_CFLAGS@
ALSA_LIBS ?= @ALSA_LIBS@
BINIO_CFLAGS ?= @BINIO_CFLAGS@
BINIO_LIBS ?= @BINIO_LIBS@
BS2B_CFLAGS ?= @BS2B_CFLAGS@
BS2B_LIBS ?= @BS2B_LIBS@
CDIO_LIBS ?= @CDIO_LIBS@
......
# Please don't update this file manually - use ./update-potfiles.sh instead!
src/aac-raw/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
......@@ -128,6 +129,7 @@ src/notify/osd.cc
src/oss4/oss.h
src/oss4/plugin.cc
src/playlist-manager/playlist-manager.cc
src/playlist-manager-qt/playlist-manager-qt.cc
src/pls/pls.cc
src/psf/plugin.cc
src/psf/psx.h
......@@ -139,33 +141,44 @@ src/qtui/main_window_actions.cc
src/qtui/main_window.cc
src/qtui/playlist_model.cc
src/qtui/qtui.cc
src/qtui/settings.cc
src/qtui/status_bar.cc
src/resample/resample.cc
src/scrobbler2/config_window.cc
src/scrobbler2/scrobbler.cc
src/scrobbler2/scrobbler_communication.cc
src/sdlout/sdlout.cc
src/search-tool-qt/search-tool-qt.cc
src/search-tool/search-tool.cc
src/sid/xmms-sid.cc
src/sid/xs_config.cc
src/silence-removal/silence-removal.cc
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/plugin.cc
src/skins/preset-browser.cc
src/skins/preset-list.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/plugin.cc
src/skins-qt/skins_cfg.cc
src/skins-qt/skinselector.cc
src/skins/search-select.cc
src/skins/skins_cfg.cc
src/skins/ui_equalizer.cc
src/skins/ui_main.cc
src/skins/ui_main_evlisteners.cc
src/skins/ui_playlist.cc
src/skins/ui_skinselector.cc
src/skins/util.cc
src/skins/skinselector.cc
src/sndfile/plugin.cc
src/sndio-ng/sndio.cc
src/song_change/song_change.cc
src/song-info-qt/song-info.cc
src/sox-resampler/sox-resampler.cc
src/speed-pitch/speed-pitch.cc
src/statusicon-qt/statusicon.cc
src/statusicon/statusicon.cc
src/stereo_plugin/stereo.cc
src/tonegen/tonegen.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.
PLUGIN = adplug${PLUGIN_SUFFIX}
SRCS = adplug-xmms.cc \
binio/binfile.cc \
binio/binio.cc \
binio/binstr.cc \
core/fmopl.cc \
core/debug.cc \
core/adlibemu.cc \
core/adplug.cc \
core/emuopl.cc \
core/fprovide.cc \
core/fprovide.cc \
core/player.cc \
core/database.cc \
core/database.cc \
core/hsc.cc \
core/sng.cc \
core/imf.cc \
core/players.cc \
core/protrack.cc \
core/protrack.cc \
core/a2m.cc \
core/adtrack.cc \
core/amd.cc \
......@@ -62,5 +65,4 @@ plugindir := ${plugindir}/${INPUT_PLUGIN_DIR}
LD = ${CXX}
CFLAGS += ${PLUGIN_CFLAGS}
CXXFLAGS += ${PLUGIN_CFLAGS} -Wno-sign-compare
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${BINIO_CFLAGS} -I../.. -I./core
LIBS += ${BINIO_LIBS}
CPPFLAGS += ${PLUGIN_CPPFLAGS} -I../.. -I./core -I./binio
......@@ -86,7 +86,6 @@ const char * const AdPlugXMMS::exts[] = {
static struct {
int freq = 44100l;
bool bit16 = true, stereo = false, endless = false;
CPlayers players = CAdPlug::getPlayers();
} conf;
// Player variables
......@@ -122,12 +121,6 @@ dbg_printf (const char *fmt, ...)
#endif
static CPlayer *
factory (VFSFile & fd, Copl * newopl)
{
return CAdPlug::factory (fd, newopl, conf.players);
}
/***** Main player (!! threaded !!) *****/
Tuple AdPlugXMMS::read_tuple (const char * filename, VFSFile & fd)
......@@ -135,10 +128,8 @@ Tuple AdPlugXMMS::read_tuple (const char * filename, VFSFile & fd)
Tuple tuple;
CSilentopl tmpopl;
if (!fd)
return tuple;
CPlayer *p = factory (fd, &tmpopl);
CFileProvider fp (fd);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, fp);
if (p)
{
......@@ -182,7 +173,8 @@ bool AdPlugXMMS::play (const char * filename, VFSFile & fd)
// Try to load module
dbg_printf ("factory, ");
if (!(plr.p = factory (fd, &opl)))
CFileProvider fp (fd);
if (!(plr.p = CAdPlug::factory (filename, &opl, fp)))
{
dbg_printf ("error!\n");
// MessageBox("AdPlug :: Error", "File could not be opened!", "Ok");
......@@ -271,7 +263,8 @@ bool AdPlugXMMS::is_our_file (const char * filename, VFSFile & fd)
{
CSilentopl tmpopl;
CPlayer *p = factory (fd, &tmpopl);
CFileProvider fp (fd);
CPlayer *p = CAdPlug::factory (filename, &tmpopl, fp);
dbg_printf ("adplug_is_our_file(\"%s\"): returned ", filename);
......@@ -306,21 +299,6 @@ bool AdPlugXMMS::init ()
conf.freq = aud_get_int (CFG_VERSION, "Frequency");
conf.endless = aud_get_bool (CFG_VERSION, "Endless");
// Read file type exclusion list
dbg_printf ("exclusion, ");
{
String cfgstr = aud_get_str (CFG_VERSION, "Exclude");
if (cfgstr[0])
{
StringBuf exclude = str_concat ({cfgstr, ":"});
str_replace_char (exclude, ':', 0);
for (char * p = exclude; * p; p += strlen (p) + 1)
conf.players.remove (conf.players.lookup_filetype (p));
}
}
// Load database from disk and hand it to AdPlug
dbg_printf ("database");
{
......@@ -358,18 +336,4 @@ void AdPlugXMMS::cleanup ()
aud_set_bool (CFG_VERSION, "Stereo", conf.stereo);
aud_set_int (CFG_VERSION, "Frequency", conf.freq);
aud_set_bool (CFG_VERSION, "Endless", conf.endless);
dbg_printf ("exclude, ");
std::string exclude;
for (CPlayers::const_iterator i = CAdPlug::getPlayers().begin ();
i != CAdPlug::getPlayers().end (); i++)
if (find (conf.players.begin (), conf.players.end (), *i) ==
conf.players.end ())
{
if (!exclude.empty ())
exclude += ":";
exclude += (*i)->filetype;
}
aud_set_str (CFG_VERSION, "Exclude", exclude.c_str ());
}
/*
* This library 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 library 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 library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* binfile.h - Binary file I/O
* Copyright (C) 2002, 2003 Simon Peter <dn.tlp@gmx.net>
*/
#include <stdio.h>
#include <errno.h>
#include "binfile.h"
/***** binfbase *****/
binfbase::binfbase()
: f(NULL)
{
}
binfbase::~binfbase()
{
if(f != NULL) close();
}
void binfbase::close()
{
if(f != NULL) {
if(fclose(f) == EOF) err |= Fatal; else f = NULL;
} else
err |= NotOpen;
}
void binfbase::seek(long pos, Offset offs)
{
int error = 0;
if(f == NULL) { err |= NotOpen; return; }
switch(offs) {
case Set: error = fseek(f, pos, SEEK_SET); break;
case Add: error = fseek(f, pos, SEEK_CUR); break;
case End: error = fseek(f, pos, SEEK_END); break;
}
if(error == -1) err |= Fatal;
}
long binfbase::pos()
{
long pos;
if(f == NULL) { err |= NotOpen; return 0; }
pos = ftell(f);
if(pos == -1) {
err |= Fatal;
return 0;
} else
return pos;
}
/***** binifstream *****/
binifstream::binifstream()
{
}
binifstream::binifstream(const char *filename, const Mode mode)
{
open(filename, mode);
}
#if BINIO_ENABLE_STRING
binifstream::binifstream(const std::string &filename, const Mode mode)
{
open(filename, mode);
}
#endif
binifstream::~binifstream()
{
}
void binifstream::open(const char *filename, const Mode mode)
{
f = fopen(filename, "rb");
if(f == NULL)
switch(errno) {
case ENOENT: err |= NotFound; break;
case EACCES: err |= Denied; break;
default: err |= NotOpen; break;
}
}
#if BINIO_ENABLE_STRING
void binifstream::open(const std::string &filename, const Mode mode)
{
open(filename.c_str(), mode);
}
#endif
binifstream::Byte binifstream::getByte()
{
int read;
if(f != NULL) {
read = fgetc(f);
if(read == EOF) err |= Eof;
return (Byte)read;
} else {
err |= NotOpen;
return 0;
}
}
/***** binofstream *****/
<