# HG changeset patch # User Matti Hamalainen # Date 1218575184 -10800 # Node ID ba9eb9cc287fc4b2dab71f7c1b8b515ef3952fe8 # Parent b58b2617fe1306725e04fed64c926def3964717d# Parent 278100ea0e92c6b8c50ed206bd215631e07352aa Automated merge with ssh://hg.atheme.org//hg/audacious diff -r 278100ea0e92 -r ba9eb9cc287f man/audacious.1.in --- a/man/audacious.1.in Wed Aug 13 00:06:06 2008 +0300 +++ b/man/audacious.1.in Wed Aug 13 00:06:24 2008 +0300 @@ -3,10 +3,10 @@ Audacious \- an audio player for X. .SH SYNOPSIS .B audacious -[\-h] [\-\-help] [\-r] -[\-\-rew] [\-p] [\-\-play] [\-u] [\-\-pause] [\-s] [\-\-stop] [\-f] -[\-\-fwd] [\-e] [\-\-enqueue] [\-m] [\-\-show\-main\-window] [\-v] -[\-\-version] [\-\-headless] [\fIfilename\fP]... +[\fB\-h\fP] [\fB\-\-help\fP] [\fB\-r\fP] +[\fB\-\-rew\fP] [\fB\-p\fP] [\fB\-\-play\fP] [\fB\-u\fP] [\fB\-\-pause\fP] [\fB\-s\fP] [\fB\-\-stop\fP] [\fB\-f\fP] +[\fB\-\-fwd\fP] [\fB\-e\fP] [\fB\-\-enqueue\fP] [\fB\-m\fP] [\fB\-\-show\-main\-window\fP] [\fB\-v\fP] +[\fB\-\-version\fP] [\fB\-i\fP \fIinterface\fP] [\fB\-\-interface\fP \fIinterface\fP] [\fB\-\-display\fP=\fIDISPLAY\fP] [\fIfilename\fP]... .SH DESCRIPTION \fIAudacious\fP is a media player, based on Beep Media Player, which is in turn based on the X Multimedia System. @@ -47,8 +47,25 @@ .B \-v, \-\-version Print version number and exit. .TP -.B \-H, \-\-headless -Starts Audacious in headless mode. +.B \-i, \-\-interface +Select interface to use. +.TP +.B \-\-display=\fIDISPLAY\fP +Select X display to use. +.SH INTERFACES +Audacious supports multiple interface plugins. Interface plugin determines Audacious look'n'feel. + +As for now, you can use following interfaces: + +.in +2 +default Default interface that uses GTK+ widgets +.br +skinned Interface that supports skinned interface +.br +legacy Old (Audacious 1.*) skinned interface +.br +headless Headless mode + .SH SKINS Audacious supports Winamp Classic style skins. Skins may be stored in either archived (\fI.zip\fP, \fI.wsz\fP, \fI.tgz\fP, \fI.tar.gz\fP, diff -r 278100ea0e92 -r ba9eb9cc287f po/pt_BR.po --- a/po/pt_BR.po Wed Aug 13 00:06:06 2008 +0300 +++ b/po/pt_BR.po Wed Aug 13 00:06:24 2008 +0300 @@ -118,7 +118,7 @@ "Try `%s --help' for more information.\n" msgstr "" "%s: %s\n" -"Tente `%s --ajuda' para mais informações.\n" +"Tente `%s --help' para mais informações.\n" #: src/audacious/main.c:538 #, c-format diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/Makefile --- a/src/audacious/Makefile Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/Makefile Wed Aug 13 00:06:24 2008 +0300 @@ -150,8 +150,7 @@ ui/carbon-menubar.ui CLEAN = build_stamp.c libaudacious.exe.a -EXT_DEPS = ../libguess/libguess.a \ - ../libSAD/libSAD.a +EXT_DEPS = ../libguess/libguess.a ../libSAD/libSAD.so ifeq ($(USE_EGGSM),yes) EXT_DEPS += ../libeggsmclient/libeggsmclient.a @@ -182,17 +181,17 @@ ${LIBMCS_CFLAGS} \ ${SIMD_CFLAGS} \ -D_AUDACIOUS_CORE \ - -I../libSAD \ ${EGGSM_CFLAGS} \ -I.. -I../.. \ -I./intl \ - -I. + -I. \ + -I../libSAD LIBS += ${LDADD} \ ${LIBINTL} \ ${SAMPLERATE_LIBS} \ ../libguess/libguess.a \ - ../libSAD/libSAD.a \ + -L../libSAD -lSAD \ ${EGGSM_LIBS} \ ${GLIB_LIBS} \ ${GTHREAD_LIBS} \ diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/input.c --- a/src/audacious/input.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/input.c Wed Aug 13 00:06:24 2008 +0300 @@ -55,8 +55,6 @@ #include "libSAD.h" -#define FMT_FRACBITS(a) ( (a) == FMT_FIXED32 ? __AUDACIOUS_ASSUMED_MAD_F_FRACBITS__ : 0 ) - G_LOCK_DEFINE_STATIC(vis_mutex); InputPluginData ip_data = { diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/output.c --- a/src/audacious/output.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/output.c Wed Aug 13 00:06:24 2008 +0300 @@ -55,8 +55,6 @@ # include "src_flow.h" #endif -#define FMT_FRACBITS(a) ( (a) == FMT_FIXED32 ? __AUDACIOUS_ASSUMED_MAD_F_FRACBITS__ : 0 ) - OutputPluginData op_data = { NULL, NULL @@ -684,3 +682,16 @@ SAD_dither_apply_replaygain(sad_state_from_float, &info, &mode); } + +void output_plugin_cleanup(void) +{ + OutputPlugin *op = get_current_output_plugin(); + op->init(); + output_close_audio(); + printf("output plugin cleanupn\n"); +} +void output_plugin_reinit(void) +{ + + printf("output plugin reinit \n"); +} diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/output.h --- a/src/audacious/output.h Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/output.h Wed Aug 13 00:06:24 2008 +0300 @@ -70,5 +70,6 @@ extern OutputPlugin psuedo_output_plugin; extern OutputPluginData op_data; - +void output_plugin_cleanup(void); +void output_plugin_reinit(void); #endif /* AUDACIOUS_OUTPUT_H */ diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/plugin.h --- a/src/audacious/plugin.h Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/plugin.h Wed Aug 13 00:06:24 2008 +0300 @@ -47,6 +47,7 @@ #include "audacious/preferences.h" #include "audacious/interface.h" #include "audacious/equalizer_preset.h" +#include "libSAD/libSAD.h" #define PLUGIN(x) ((Plugin *)(x)) #define INPUT_PLUGIN(x) ((InputPlugin *)(x)) @@ -122,6 +123,8 @@ a == FMT_S32_NE || a == FMT_S32_LE || a == FMT_S32_BE || a == FMT_U32_NE || a == FMT_U32_LE || a == FMT_U32_BE || \ a == FMT_FIXED32) ? sizeof(gint32) : sizeof(float)))) +#define FMT_FRACBITS(a) ( (a) == FMT_FIXED32 ? __AUDACIOUS_ASSUMED_MAD_F_FRACBITS__ : 0 ) + typedef enum { INPUT_VIS_ANALYZER, INPUT_VIS_SCOPE, @@ -361,6 +364,9 @@ gchar *(*util_get_localdir)(void); void (*util_menu_main_show)(gint x, gint y, guint button, guint time); + gpointer (*smart_realloc)(gpointer ptr, gsize *size); + SAD_sample_format (*sadfmt_from_afmt)(AFormat fmt); + /* INI funcs */ INIFile *(*open_ini_file)(const gchar *filename); void (*close_ini_file)(INIFile *key_file); @@ -650,6 +656,8 @@ gboolean (*vfs_fget_be16)(guint16 *value, VFSFile *stream); gboolean (*vfs_fget_be32)(guint32 *value, VFSFile *stream); gboolean (*vfs_fget_be64)(guint64 *value, VFSFile *stream); + void (*output_plugin_cleanup)(void); + void (*output_plugin_reinit)(void); }; /* Convenience macros for accessing the public API. */ @@ -734,6 +742,8 @@ #define aud_info_dialog _audvt->util_info_dialog #define audacious_info_dialog _audvt->util_info_dialog #define aud_get_gentitle_format _audvt->get_gentitle_format +#define aud_smart_realloc _audvt->smart_realloc +#define aud_sadfmt_from_afmt _audvt->sadfmt_from_afmt #define aud_escape_shell_chars _audvt->escape_shell_chars #define aud_str_append _audvt->str_append @@ -994,6 +1004,8 @@ #define aud_save_preset_file _audvt->save_preset_file #define aud_equalizer_read_aud_preset _audvt->equalizer_read_aud_preset #define aud_load_preset_file _audvt->load_preset_file +#define aud_output_plugin_cleanup _audvt->output_plugin_cleanup +#define aud_output_plugin_reinit _audvt->output_plugin_reinit #include "audacious/auddrct.h" diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/pluginenum.c --- a/src/audacious/pluginenum.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/pluginenum.c Wed Aug 13 00:06:24 2008 +0300 @@ -154,6 +154,9 @@ .util_info_dialog = util_info_dialog, .get_gentitle_format = get_gentitle_format, + .smart_realloc = smart_realloc, + .sadfmt_from_afmt = sadfmt_from_afmt, + .escape_shell_chars = escape_shell_chars, .str_append = str_append, .str_replace = str_replace, @@ -396,6 +399,8 @@ .save_preset_file = save_preset_file, .equalizer_read_aud_preset = equalizer_read_aud_preset, .load_preset_file = load_preset_file, + .output_plugin_cleanup = output_plugin_cleanup, + .output_plugin_reinit = output_plugin_reinit, }; /*****************************************************************/ diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_about.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_albumart.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_credits.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_credits.h diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_fileinfo.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_fileinfo.h diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_jumptotrack.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_jumptotrack.h diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_jumptotrack_cache.c --- a/src/audacious/ui_jumptotrack_cache.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/audacious/ui_jumptotrack_cache.c Wed Aug 13 00:06:24 2008 +0300 @@ -17,6 +17,10 @@ * Audacious or using our public API to be a derived work. */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #include #include diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_jumptotrack_cache.h diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_urlopener.c diff -r 278100ea0e92 -r ba9eb9cc287f src/audacious/ui_urlopener.h diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/Makefile --- a/src/libSAD/Makefile Wed Aug 13 00:06:06 2008 +0300 +++ b/src/libSAD/Makefile Wed Aug 13 00:06:24 2008 +0300 @@ -1,4 +1,7 @@ -STATIC_LIB_NOINST = libSAD.a +LIB = ${LIB_PREFIX}SAD${LIB_SUFFIX} +LIB_MAJOR = 1 +LIB_MINOR = 0 + SRCS = dither.c \ dither_ops.c \ noicegen.c @@ -12,3 +15,4 @@ PACKAGE = libSAD CPPFLAGS += ${SIMD_CFLAGS} -I../.. +CFLAGS += ${LIB_CFLAGS} \ No newline at end of file diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/common.h --- a/src/libSAD/common.h Wed Aug 13 00:06:06 2008 +0300 +++ b/src/libSAD/common.h Wed Aug 13 00:06:24 2008 +0300 @@ -130,12 +130,6 @@ #define SAD_ERROR_OK 0 #define SAD_ERROR_FAIL -1 -#ifdef DEBUG -#define DEBUG_MSG(f,x) {printf("debug: "f, x);} -#else -#define DEBUG_MSG(f,x) {} -#endif - typedef struct { int present; float track_gain; /* in dB !!! */ diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/debug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libSAD/debug.h Wed Aug 13 00:06:24 2008 +0300 @@ -0,0 +1,5 @@ +#ifdef DEBUG +#define DEBUG_MSG(f,x) {printf("debug: "f, x);} +#else +#define DEBUG_MSG(f,x) {} +#endif diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/dither.c --- a/src/libSAD/dither.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/libSAD/dither.c Wed Aug 13 00:06:24 2008 +0300 @@ -25,6 +25,8 @@ #include "dither_ops.h" #include "noicegen.h" +#include "debug.h" + #include #include diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/dither_ops.c --- a/src/libSAD/dither_ops.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/libSAD/dither_ops.c Wed Aug 13 00:06:24 2008 +0300 @@ -23,6 +23,8 @@ #include "dither_ops.h" #include "dither.h" +#include "debug.h" + #define SAD_GET_LE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) | (uint16_t)(((uint8_t*)(a))[1]) << 8 ) #define SAD_GET_BE16(a) ( (uint16_t)(((uint8_t*)(a))[0]) << 8 | (uint16_t)(((uint8_t*)(a))[1]) ) diff -r 278100ea0e92 -r ba9eb9cc287f src/libSAD/noicegen.c --- a/src/libSAD/noicegen.c Wed Aug 13 00:06:06 2008 +0300 +++ b/src/libSAD/noicegen.c Wed Aug 13 00:06:24 2008 +0300 @@ -17,6 +17,8 @@ #include "noicegen.h" +#include "debug.h" + int triangular_dither_noise(int nbits) { // parameter nbits : the peak-to-peak amplitude desired (in bits)