Commit ee3770c3 authored by Mateusz Łukasik's avatar Mateusz Łukasik

Imported Upstream version 3.8~beta2

parent 6f99159e
......@@ -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 -Wno-deprecated-declarations"
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 -Wno-deprecated-declarations"
CXXFLAGS="$CXXFLAGS -stdlib=libc++ -std=gnu++11 -ffast-math -Wall -pipe"
LDFLAGS="$LDFLAGS -lc++ -stdlib=libc++"
else
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe -Wno-deprecated-declarations"
CXXFLAGS="$CXXFLAGS -std=gnu++11 -ffast-math -Wall -pipe"
fi
AUD_CHECK_CFLAGS(-Wtype-limits)
AUD_CHECK_CXXFLAGS(-Woverloaded-virtual)
......@@ -142,9 +142,9 @@ AC_PROG_LN_S
AC_PATH_PROG([RM], [rm])
AC_PATH_PROG([MV], [mv])
AC_PATH_PROG([CP], [cp])
AC_PATH_PROG([AR], [ar])
AC_PATH_PROG([RANLIB], [ranlib])
AC_PATH_PROG([WINDRES], [windres])
AC_PATH_TOOL([AR], [ar])
AC_PATH_TOOL([RANLIB], [ranlib])
AC_PATH_TOOL([WINDRES], [windres])
dnl Check for POSIX threads
dnl =======================
......
......@@ -8,23 +8,26 @@ Icon=audacious
Categories=AudioVideo;Audio;Player;GTK;
Exec=audacious %U
TryExec=audacious
StartupNotify=true
Terminal=false
MimeType=application/ogg;application/x-cue;application/x-ogg;application/xspf+xml;audio/midi;audio/mp3;audio/mp4;audio/mpeg;audio/mpegurl;audio/ogg;audio/prs.sid;audio/x-flac;audio/x-it;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-asx;audio/x-ms-wma;audio/x-musepack;audio/x-s3m;audio/x-scpls;audio/x-stm;audio/x-vorbis+ogg;audio/x-wav;audio/x-xm;inode/directory;x-content/audio-cdda;
Comment[be]=Слухайце музыку
Comment[bg]=Слушай музика
Comment[ca]=Escolta música
Comment[cs]=Poslouchej hudbu
Comment[cs]=Poslouchat hudbu
Comment[da]=Lyt til musik
Comment[de]=Musik hören
Comment[el]=Ακρόαση μουσικής
Comment[eo]=Aŭskulti muzikon
Comment[es_CL]=Listado de musica
Comment[es_MX]=Escuchar la música
Comment[es]=Escuchar música
Comment[fi]=Kuuntele musiikkia
Comment[fr]=Écouter de la musique
Comment[gl]=Escoitar música
Comment[hu]=Hallgasson zenét
Comment[hr]=Slušanje glazbe
Comment[hu]=Zenehallgatás
Comment[id_ID]=Dengarkan musik
Comment[it]=Ascolta la musica
Comment[ja]=音楽を聴きます
......@@ -38,6 +41,7 @@ Comment[pt_BR]=Ouça música
Comment[pt_PT]=Reprodução de músicas
Comment[ro]=Ascultă muzică
Comment[ru]=Слушать музыку
Comment[sk]=Počúvajte hudbu
Comment[sr]=Слушајте музику
Comment[sv]=Lyssna på musik
Comment[tr]=Müzik dinleyin
......@@ -54,11 +58,13 @@ GenericName[da]=Musikafspiller
GenericName[de]=Musikspieler
GenericName[el]=Πρόγραμμα αναπαραγωγής μουσικής
GenericName[eo]=Muzik-ludilo
GenericName[es_CL]=Reproductor de musica
GenericName[es_MX]=Reproductor de Música
GenericName[es]=Reproductor de música
GenericName[fi]=Musiikkisoitin
GenericName[fr]=Diffuseur de musique
GenericName[gl]=Reprodutor de música
GenericName[hr]=Svirač glazbe
GenericName[hu]=Zene lejátszó
GenericName[id_ID]=Pemutar musik
GenericName[it]=Lettore musicale
......@@ -73,6 +79,7 @@ GenericName[pt_BR]=Reprodutor de Música
GenericName[pt_PT]=Reprodutor áudio
GenericName[ro]=Player de muzică
GenericName[ru]=Музыкальный проигрыватель
GenericName[sk]=Hudobný prehrávač
GenericName[sr]=Програм за слушање музике
GenericName[sv]=Musikspelare
GenericName[tr]=Müzik Çalar
......
......@@ -40,9 +40,6 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define if the /proc/self/exe symlink is supported */
#undef HAVE_PROC_SELF_EXE
/* Define to 1 if you have the `sigwait' function. */
#undef HAVE_SIGWAIT
......
This diff is collapsed.
......@@ -4,13 +4,17 @@ dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([audacious], [3.7.2])
AC_INIT([audacious], [3.8-beta2])
AC_COPYRIGHT([Copyright (C) 2001-2016 Audacious developers and others])
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE_NAME", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$PACKAGE_VERSION", [Version number of package])
AC_DEFINE_UNQUOTED(COPYRIGHT, "Copyright © 2001-2016 Audacious developers and others", [Copyright])
COPYRIGHT="Copyright (C) 2001-2016 Audacious developers and others"
AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT", [Copyright])
AC_SUBST(COPYRIGHT)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
......@@ -28,14 +32,6 @@ dnl ===============================
AC_CHECK_FUNCS([sigwait])
AC_MSG_CHECKING([for /proc/self/exe])
if test -e "/proc/self/exe" ; then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_PROC_SELF_EXE], [1], [Define if the /proc/self/exe symlink is supported])
else
AC_MSG_RESULT(no)
fi
dnl iconv
dnl =====
......@@ -55,20 +51,10 @@ dnl Build stamp
dnl ===========
AC_ARG_WITH([buildstamp],
AS_HELP_STRING([--with-buildstamp=XXX], [Set build stamp to XXX]),
AC_DEFINE_UNQUOTED([BUILDSTAMP], "$withval", [Build stamp]),
AC_DEFINE_UNQUOTED([BUILDSTAMP], "unknown build", [Build stamp]))
dnl Activation of text console (MS-Windows ONLY)
dnl ============================================
AC_ARG_ENABLE([text-console],
[AS_HELP_STRING([--enable-text-console],[Enable text console for MS-Windows hosts])],
[use_text_console=$withval],
[use_text_console=no]
)
if test "x$HAVE_MSWINDOWS" = "xyes" && test "x$use_text_console" = "xno" ; then
LDFLAGS="$LDFLAGS -Wl,-subsystem,windows"
fi
BUILDSTAMP="$withval", BUILDSTAMP="unknown build")
AC_DEFINE_UNQUOTED(BUILDSTAMP, "$BUILDSTAMP", [Build stamp])
AC_SUBST(BUILDSTAMP)
dnl D-Bus support
dnl =============
......@@ -128,6 +114,8 @@ AC_CONFIG_FILES([
man/audacious.1
src/libaudcore/audio.h
src/libaudcore/tinylock.h
win32/audacious.nsi
win32/override/README.txt
])
AC_OUTPUT
......
--- Makefile.am.0 2010-05-01 03:33:40 -0400
+++ Makefile.am 2013-09-13 21:17:47 -0400
@@ -27,5 +27,5 @@
lib_LTLIBRARIES = libcue.la
-libcue_la_LDFLAGS = -version-info @LIBCUE_LIBTOOL_VERSION@
+libcue_la_LDFLAGS = -version-info @LIBCUE_LIBTOOL_VERSION@ -no-undefined
libcueincludedir = $(includedir)/@LIBCUE_LIBRARY_NAME@-@LIBCUE_API_VERSION@/@LIBCUE_LIBRARY_NAME@
--- utils.c.0 2009-11-30 23:24:52 -0500
+++ utils.c 2011-04-01 23:38:52 -0500
@@ -657,7 +657,7 @@
return !ferror (hFile);
}
-#ifdef WIN32
+#if 0
int64_t DoGetFileSize (FILE *hFile)
{
--- wavpack.pc.in.0 2013-09-29 17:30:14 -0400
+++ wavpack.pc.in 2014-01-25 16:47:55 -0500
@@ -1,4 +1,5 @@
prefix=@prefix@
+exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=${prefix}/include
.TH AUDACIOUS "1" "July 2015" "Version @PACKAGE_VERSION@" "Audacious"
.TH AUDACIOUS "1" "May 2016" "Version @PACKAGE_VERSION@" "Audacious"
.SH NAME
audacious \- an advanced audio player.
......@@ -73,6 +73,10 @@ Print version information and exit.
.TP
.B -V, --verbose
Print debugging output while running (may be used twice for even more output).
.TP
.B -N, --new-instance
Starts a new instance. The second instance started may be controlled with
\fBaudtool -2\fR, the third with \fBaudtool -3\fR, etc. (up to 9 instances).
.SH KEYBINDINGS
.ta 24
......@@ -133,11 +137,11 @@ Shift + Control + l Display Add URL dialog
.SH FILES
.TP
~/.config/audacious/config
User's Audacious configuration.
~/.config/audacious/config, ~/.config/audacious-2/config, etc.
Configuration file for each Audacious instance.
.TP
~/.config/audacious/playlists
Folder in which playlists are stored.
~/.config/audacious/playlists, ~/.config/audacious-2/playlists, etc.
Folders in which playlists are stored.
.TP
~/.local/share/audacious/Skins, @datarootdir@/audacious/Skins
Default locations where Audacious should look for skin files.
......
.TH AUDTOOL "1" "July 2015" "Version @PACKAGE_VERSION@"
.TH AUDTOOL "1" "May 2016" "Version @PACKAGE_VERSION@"
.SH NAME
.B audtool
......@@ -6,7 +6,7 @@
.SH SYNOPSIS
.B audtool
\fIcommand\fR [\fIparameter\fR ...] ...
[\fIinstance\fR] \fIcommand\fR [\fIparameter\fR ...] ...
.SH DESCRIPTION
.B audtool
......@@ -15,6 +15,10 @@ sends commands to a running instance of Audacious.
It can send many common commands, such as to skip to the next song in the
playlist, and can also print status information, such as the title of the
current song.
.PP
\fIinstance\fR may be given as \fB-1\fR, \fB-2\fR, etc. (up to \fB-9\fR) to
specify which instance of Audacious to control when multiple instances have been
started.
.SH COMMANDS
.SS Current song information:
......@@ -103,6 +107,12 @@ Seek to the given time in seconds, relative to the beginning of the song.
.TP
.B --playback-seek-relative \fItime\fR
Seek to the given time in seconds, relative to the current time counter.
.TP
.B --playback-record
Toggle recording of the output stream (using FileWriter).
.TP
.B --playback-recording
Return an exit code of 0 (true) if stream recording is enabled.
.SS Playlist commands:
......@@ -298,6 +308,16 @@ Show or hide the About window.
.B --version
Print version information.
.TP
.B --plugin-is-enabled \fIplugin\fR
Return an exit code of 0 (true) if the given plugin is enabled. The plugin is
specified using its installed filename minus the folder path and suffix: for
example, \fBcrossfade\fR for \fI@plugindir@/Effect/crossfade.so\fR.
.TP
.B --plugin-enable \fIplugin\fR [on|off]
Enable or disable the given plugin. Note that interface and output plugins
cannot be disabled directly since one of each must always be active. Enabling
an interface or output plugin will automatically disable the previous plugin.
.TP
.B --shutdown
Shut down Audacious.
.TP
......
......@@ -2,6 +2,7 @@
src/audacious/main.cc
src/libaudcore/adder.cc
src/libaudcore/audstrings.cc
src/libaudcore/output.cc
src/libaudcore/playback.cc
src/libaudcore/playlist.cc
src/libaudcore/playlist-files.cc
......@@ -22,6 +23,7 @@ src/libaudgui/playlists.cc
src/libaudgui/plugin-menu.cc
src/libaudgui/plugin-prefs.cc
src/libaudgui/plugin-view.cc
src/libaudgui/prefs-widget.cc
src/libaudgui/prefs-window.cc
src/libaudgui/preset-browser.cc
src/libaudgui/queue-manager.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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -28,10 +28,11 @@ CPPFLAGS := -I.. -I../.. \
${CPPFLAGS} \
${GLIB_CFLAGS}
CPPFLAGS += -D_AUDACIOUS_CORE
LIBS := -L../libaudcore -laudcore \
${LIBS} -lm \
${LIBINTL} \
${GLIB_LIBS}
ifeq ($(HAVE_MSWINDOWS),yes)
LDFLAGS := ${LDFLAGS} -Wl,-subsystem,windows
endif
......@@ -17,10 +17,12 @@
* the use of this software.
*/
#include <libaudcore/audstrings.h>
#include <libaudcore/drct.h>
#include <libaudcore/equalizer.h>
#include <libaudcore/interface.h>
#include <libaudcore/playlist.h>
#include <libaudcore/plugins.h>
#include <libaudcore/runtime.h>
#include <libaudcore/tuple.h>
......@@ -347,6 +349,33 @@ static gboolean do_playqueue_remove (Obj * obj, Invoc * invoc, int pos)
return true;
}
static gboolean do_plugin_enable (Obj * obj, Invoc * invoc, const char * name, gboolean enable)
{
PluginHandle * plugin = aud_plugin_lookup_basename (name);
if (! plugin)
{
AUDERR ("No such plugin: %s\n", name);
return false;
}
aud_plugin_enable (plugin, enable);
FINISH (plugin_enable);
return true;
}
static gboolean do_plugin_is_enabled (Obj * obj, Invoc * invoc, const char * name)
{
PluginHandle * plugin = aud_plugin_lookup_basename (name);
if (! plugin)
{
AUDERR ("No such plugin: %s\n", name);
return false;
}
FINISH2 (plugin_is_enabled, aud_plugin_get_enabled (plugin));
return true;
}
static gboolean do_position (Obj * obj, Invoc * invoc)
{
FINISH2 (position, aud_playlist_get_position (CURRENT));
......@@ -372,6 +401,19 @@ static gboolean do_quit (Obj * obj, Invoc * invoc)
return true;
}
static gboolean do_record (Obj * obj, Invoc * invoc)
{
aud_drct_enable_record (! aud_drct_get_record_enabled ());
FINISH (record);
return true;
}
static gboolean do_recording (Obj * obj, Invoc * invoc)
{
FINISH2 (recording, aud_drct_get_record_enabled ());
return true;
}
static gboolean do_repeat (Obj * obj, Invoc * invoc)
{
FINISH2 (repeat, aud_get_bool (nullptr, "repeat"));
......@@ -554,35 +596,37 @@ static gboolean do_song_tuple (Obj * obj, Invoc * invoc, unsigned pos, const cha
{
Tuple::Field field = Tuple::field_by_name (key);
Tuple tuple;
GVariant * var = nullptr;
GVariant * var;
if (field >= 0)
tuple = aud_playlist_entry_get_tuple (CURRENT, pos);
if (tuple)
switch (tuple.get_value_type (field))
{
switch (tuple.get_value_type (field))
{
case Tuple::String:
var = g_variant_new_string (tuple.get_str (field));
break;
case Tuple::Int:
var = g_variant_new_int32 (tuple.get_int (field));
break;
default:
break;
}
}
case Tuple::String:
var = g_variant_new_string (tuple.get_str (field));
break;
case Tuple::Int:
var = g_variant_new_int32 (tuple.get_int (field));
break;
if (! var)
default:
var = g_variant_new_string ("");
break;
}
FINISH2 (song_tuple, g_variant_new_variant (var));
return true;
}
static gboolean do_startup_notify (Obj * obj, Invoc * invoc, const char * id)
{
aud_ui_startup_notify (id);
FINISH (startup_notify);
return true;
}
static gboolean do_status (Obj * obj, Invoc * invoc)
{
const char * status = "stopped";
......@@ -706,10 +750,14 @@ handlers[] =
{"handle-playqueue-clear", (GCallback) do_playqueue_clear},
{"handle-playqueue-is-queued", (GCallback) do_playqueue_is_queued},
{"handle-playqueue-remove", (GCallback) do_playqueue_remove},
{"handle-plugin-enable", (GCallback) do_plugin_enable},
{"handle-plugin-is-enabled", (GCallback) do_plugin_is_enabled},
{"handle-position", (GCallback) do_position},
{"handle-queue-get-list-pos", (GCallback) do_queue_get_list_pos},
{"handle-queue-get-queue-pos", (GCallback) do_queue_get_queue_pos},
{"handle-quit", (GCallback) do_quit},
{"handle-recording", (GCallback) do_recording},
{"handle-record", (GCallback) do_record},
{"handle-repeat", (GCallback) do_repeat},
{"handle-reverse", (GCallback) do_reverse},
{"handle-seek", (GCallback) do_seek},
......@@ -730,6 +778,7 @@ handlers[] =
{"handle-song-length", (GCallback) do_song_length},
{"handle-song-title", (GCallback) do_song_title},
{"handle-song-tuple", (GCallback) do_song_tuple},
{"handle-startup-notify", (GCallback) do_startup_notify},
{"handle-status", (GCallback) do_status},
{"handle-stop", (GCallback) do_stop},
{"handle-stop-after", (GCallback) do_stop_after},
......@@ -748,16 +797,16 @@ static unsigned owner_id = 0;
static GDBusInterfaceSkeleton * skeleton = nullptr;
static void name_acquired (GDBusConnection *, const char *, void *)
static void name_acquired (GDBusConnection *, const char * name, void *)
{
AUDINFO ("Owned D-Bus name (org.atheme.audacious) on session bus.\n");
AUDINFO ("Owned D-Bus name (%s) on session bus.\n", name);
g_main_loop_quit (mainloop);
}
static void name_lost (GDBusConnection *, const char *, void *)
static void name_lost (GDBusConnection *, const char * name, void *)
{
AUDINFO ("Owning D-Bus name (org.atheme.audacious) failed, already taken?\n");
AUDINFO ("Owning D-Bus name (%s) failed, already taken?\n", name);
g_bus_unown_name (owner_id);
owner_id = 0;
......@@ -765,8 +814,17 @@ static void name_lost (GDBusConnection *, const char *, void *)
g_main_loop_quit (mainloop);
}
StringBuf dbus_server_name ()
{
int instance = aud_get_instance ();
return (instance == 1) ? str_copy ("org.atheme.audacious") :
str_printf ("org.atheme.audacious-%d", instance);
}
StartupType dbus_server_init ()
{
auto startup = StartupType::Unknown;
GError * error = nullptr;
GDBusConnection * bus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, & error);
GMainContext * context;
......@@ -785,7 +843,7 @@ StartupType dbus_server_init ()
context = g_main_context_new ();
g_main_context_push_thread_default (context);
owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, "org.atheme.audacious",
owner_id = g_bus_own_name (G_BUS_TYPE_SESSION, dbus_server_name (),
(GBusNameOwnerFlags) 0, nullptr, name_acquired, name_lost, nullptr, nullptr);
mainloop = g_main_loop_new (context, true);
......@@ -793,14 +851,13 @@ StartupType dbus_server_init ()
g_main_loop_unref (mainloop);
mainloop = nullptr;
g_main_context_pop_thread_default (context);
g_main_context_unref (context);
if (owner_id)
return StartupType::Server;
startup = StartupType::Server;
else
startup = StartupType::Client;
dbus_server_cleanup ();
return StartupType::Client;
g_main_context_pop_thread_default (context);
g_main_context_unref (context);
ERROR:
if (error)
......@@ -809,8 +866,10 @@ ERROR:
g_error_free (error);
}
dbus_server_cleanup ();
return StartupType::Unknown;
if (startup != StartupType::Server)
dbus_server_cleanup ();
return startup;
}
void dbus_server_cleanup ()
......
......@@ -107,13 +107,16 @@ static bool parse_options (int argc, char * * argv)
else
uri = String (filename_to_uri (filename_build ({cur, arg})));
if (uri)
filenames.append (uri);
filenames.append (uri);
}
else if (! arg[1]) /* "-" (standard input) */
{
filenames.append (String ("stdin://"));
}
else if (arg[1] >= '1' && arg[1] <= '9') /* instance number */
{
aud_set_instance (arg[1] - '0');
}
else if (arg[1] == '-') /* long option */
{
bool found = false;
......@@ -181,6 +184,7 @@ static void print_help ()
static const char pad[21] = " ";
fprintf (stderr, _("Usage: audacious [OPTION] ... [FILE] ...\n\n"));
fprintf (stderr, " -1, -2, -3, etc. %s\n", _("Select instance to run/control"));
for (auto & arg_info : arg_map)
fprintf (stderr, " -%c, --%s%.*s%s\n", arg_info.short_arg,
......@@ -201,16 +205,18 @@ static void do_remote ()
g_type_init ();
#endif
/* check whether this is the first instance */
/* check whether the selected instance is running */
if (dbus_server_init () != StartupType::Client)
return;
if (! (bus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, & error)))
goto ERR;
if (! (obj = obj_audacious_proxy_new_sync (bus, (GDBusProxyFlags) 0,
"org.atheme.audacious", "/org/atheme/audacious", nullptr, & error)))
goto ERR;
if (! (bus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, & error)) ||
! (obj = obj_audacious_proxy_new_sync (bus, (GDBusProxyFlags) 0,
dbus_server_name (), "/org/atheme/audacious", nullptr, & error)))
{
AUDERR ("D-Bus error: %s\n", error->message);
g_error_free (error);
return;
}
AUDINFO ("Connected to remote session.\n");
......@@ -254,16 +260,13 @@ static void do_remote ()
if (options.mainwin)
obj_audacious_call_show_main_win_sync (obj, true, nullptr, nullptr);
const char * startup_id = getenv ("DESKTOP_STARTUP_ID");
if (startup_id)
obj_audacious_call_startup_notify_sync (obj, startup_id, nullptr, nullptr);
g_object_unref (obj);
exit (EXIT_SUCCESS);
ERR:
if (error)
{
AUDERR ("D-Bus error: %s\n", error->message);
g_error_free (error);