Commit e6e39e3e authored by Alessio Treglia's avatar Alessio Treglia

Imported Upstream version 3.2.3

parent 09e552d4
......@@ -194,6 +194,7 @@ AC_PATH_PROG([WINDRES], [windres])
dnl Check for Gtk+/GLib and pals
dnl ============================
AUD_CHECK_MODULE([GLIB], [glib-2.0], [>= 2.16], [Glib2])
AUD_CHECK_MODULE([GMODULE], [gmodule-2.0], [>= 2.16], [GModule])
AUD_CHECK_MODULE([GTHREAD], [gthread-2.0], [>= 2.16], [GThread])
AUD_CHECK_MODULE([PANGO], [pango], [>= 1.20], [Pango])
AUD_CHECK_MODULE([CAIRO], [cairo], [>= 1.6], [Cairo])
......
This diff is collapsed.
......@@ -152,6 +152,11 @@
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
......
This diff is collapsed.
......@@ -5,7 +5,7 @@ dnl ***
dnl Initialize
dnl ==========
AC_PREREQ([2.59])
AC_INIT([audacious-plugins], [3.2.2])
AC_INIT([audacious-plugins], [3.2.3])
AC_COPYRIGHT([(C) 2005-2012 Audacious Team])
AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
......@@ -401,30 +401,26 @@ if test "x$have_adplug" = "xyes"; then
AC_SUBST(BINIO_CFLAGS)
fi
dnl *** Ogg Vorbis
dnl Ogg Vorbis
dnl ==========
dnl This test is reused later to enable/disable Vorbis support in filewriter.
AC_ARG_ENABLE(vorbis,
[ --disable-vorbis disable Ogg Vorbis input plugin (default=enabled)],
[enable_vorbis=$enableval],
[enable_vorbis="yes"]
)
AS_HELP_STRING([--disable-vorbis], [disable Ogg Vorbis decoding and encoding]),
[enable_vorbis=$enableval], [enable_vorbis=yes])
if test "x$enable_vorbis" = "xyes"; then
PKG_CHECK_MODULES(OGG_VORBIS, [ogg >= 1.0 vorbis >= 1.1 vorbisfile >= 1.1],
[have_oggvorbis=yes],
[AC_MSG_WARN([*** Cannot find libogg/libvorbis, Ogg Vorbis support will not be built ***])
have_oggvorbis=no]
)
else
AC_MSG_RESULT([*** Ogg Vorbis plugin disabled per user request ***])
have_oggvorbis=no
if test $enable_vorbis = yes ; then
PKG_CHECK_MODULES(VORBIS,
[ogg >= 1.0 vorbis >= 1.0 vorbisenc >= 1.0 vorbisfile >= 1.0],
[enable_vorbis=yes], [enable_vorbis=no])
fi
if test "x$have_oggvorbis" = "xyes"; then
INPUT_PLUGINS="$INPUT_PLUGINS vorbis"
if test $enable_vorbis = yes ; then
INPUT_PLUGINS="$INPUT_PLUGINS vorbis"
fi
dnl *** FLACng
dnl FLAC
dnl ====
AC_ARG_ENABLE(flacng,
[ --disable-flacng disable flac input plugin (default=enabled)],
......@@ -693,7 +689,7 @@ AC_ARG_ENABLE(sdlout,
[enable_sdlout=$enableval], [enable_sdlout=yes])
if test $enable_sdlout = yes ; then
AM_PATH_SDL(1.2.5, [enable_sdlout=yes], [enable_sdlout=no])
PKG_CHECK_MODULES([SDL], [sdl >= 1.2.11], [enable_sdlout=yes], [enable_sdlout=no])
fi
if test $enable_sdlout = yes ; then
......@@ -757,8 +753,6 @@ fi
if test "x$enable_amidiplug" = "xyes"; then
INPUT_PLUGINS="$INPUT_PLUGINS amidi-plug"
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0],,)
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.6.0],,)
AMIDIPLUG_BACKEND_DIR=amidi-plug
AC_SUBST(AMIDIPLUG_BACKEND_DIR)
if test "x$enable_amidiplug_alsa" = "xauto" -o "x$enable_amidiplug_alsa" = "xyes"; then
......@@ -976,23 +970,14 @@ if test "x$enable_filewriter_mp3" = "xyes"; then
fi
fi
dnl Vorbis support reuses test done for Vorbis input plugin.
AC_ARG_ENABLE(filewriter_vorbis,
[ --disable-filewriter_vorbis disable FileWriter Vorbis output part (default=enabled) ],
[enable_filewriter_vorbis=$enableval], [enable_filewriter_vorbis=yes]
)
if test "x$enable_filewriter_vorbis" = "xyes"; then
PKG_CHECK_MODULES(OGG_VORBIS, [ogg >= 1.0 vorbis >= 1.0 vorbisfile >= 1.0],
[have_vorbisenc=yes], [have_vorbisenc=no])
if test "x$have_vorbisenc" = "xyes"; then
AC_DEFINE(FILEWRITER_VORBIS, 1, [Define if Vorbis output part should be built])
FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS `pkg-config --cflags vorbisenc`"
FILEWRITER_LIBS="$FILEWRITER_LIBS `pkg-config --libs vorbisenc`"
fi
if test $enable_vorbis = yes ; then
AC_DEFINE(FILEWRITER_VORBIS, 1, [Define if Vorbis output part should be built])
FILEWRITER_CFLAGS="$FILEWRITER_CFLAGS $VORBIS_CFLAGS"
FILEWRITER_LIBS="$FILEWRITER_LIBS $VORBIS_LIBS"
fi
AC_ARG_ENABLE(filewriter_flac,
[ --disable-filewriter_flac disable FileWriter FLAC output part (default=enabled) ],
[enable_filewriter_flac=$enableval], [enable_filewriter_flac=yes]
......@@ -1159,7 +1144,7 @@ echo " Jack Audio Connection Kit (jack): $enable_jack"
echo " Simple DirectMedia Layer (sdlout): $enable_sdlout"
echo " FileWriter: $enable_filewriter"
echo " -> FileWriter MP3 output part: $have_lame"
echo " -> FileWriter Vorbis output part: $have_vorbisenc"
echo " -> FileWriter Vorbis output part: $enable_vorbis"
echo " -> FileWriter FLAC output part: $have_writer_flac"
echo " Null Audio output (null): yes"
echo " Open Sound System v3 (deprecated): $enable_oss"
......@@ -1176,7 +1161,7 @@ echo " -> FluidSynth backend: $enable_amidiplug_fluidsynth"
echo " CD Digital Audio (cdaudio_ng): $enable_cdaudio_ng"
echo " sndfile extensions: $enable_sndfile"
echo " Tone Generator: yes"
echo " Ogg Vorbis (vorbis): $have_oggvorbis"
echo " Ogg Vorbis (vorbis): $enable_vorbis"
echo " Free Lossless Audio Codec (flacng): $have_flacng"
echo " Commodore 64 audio (SID): $have_sidplay $xs_have_sidplay2_api"
echo " -> libSIDPlay1 support: $xs_have_sidplay1"
......
......@@ -65,8 +65,6 @@ JACK_CFLAGS ?= @JACK_CFLAGS@
JACK_LIBS ?= @JACK_LIBS@
LIBFLAC_LIBS ?= @LIBFLAC_LIBS@
LIBFLAC_CFLAGS ?= @LIBFLAC_CFLAGS@
LIBROAR_CFLAGS ?= @LIBROAR_CFLAGS@
LIBROAR_LIBS ?= @LIBROAR_LIBS@
MMS_CFLAGS ?= @MMS_CFLAGS@
MMS_LIBS ?= @MMS_LIBS@
MODPLUG_CFLAGS ?= @MODPLUG_CFLAGS@
......@@ -79,10 +77,6 @@ NEON_CFLAGS ?= @NEON_CFLAGS@
NEON_LIBS ?= @NEON_LIBS@
NOTIFY_CFLAGS ?= @NOTIFY_CFLAGS@
NOTIFY_LIBS ?= @NOTIFY_LIBS@
OGG_VORBIS_CFLAGS ?= @OGG_VORBIS_CFLAGS@
OGG_VORBIS_LIBS ?= @OGG_VORBIS_LIBS@
OPENAL_CFLAGS ?= @OPENAL_CFLAGS@
OPENAL_LIBS ?= @OPENAL_LIBS@
OSS_CFLAGS ?= @OSS_CFLAGS@
PANGO_CFLAGS ?= @PANGO_CFLAGS@
PANGO_LIBS ?= @PANGO_LIBS@
......@@ -100,6 +94,8 @@ SIDPLAY2_CFLAGS ?= @SIDPLAY2_CFLAGS@
SIDPLAY2_LIBS ?= @SIDPLAY2_LIBS@
SNDFILE_CFLAGS ?= @SNDFILE_CFLAGS@
SNDFILE_LIBS ?= @SNDFILE_LIBS@
VORBIS_CFLAGS ?= @VORBIS_CFLAGS@
VORBIS_LIBS ?= @VORBIS_LIBS@
WAVPACK_CFLAGS ?= @WAVPACK_CFLAGS@
WAVPACK_LIBS ?= @WAVPACK_LIBS@
XCOMPOSITE_CFLAGS ?= @XCOMPOSITE_CFLAGS@
......
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.
......@@ -79,17 +79,17 @@ CcffLoader::load (VFSFile * fd, const CFileProvider & fp)
if (!unpacker->unpack (packed_module, module))
{
delete unpacker;
delete packed_module;
delete module;
delete[] packed_module;
delete[] module;
return false;
}
delete unpacker;
delete packed_module;
delete[] packed_module;
if (memcmp (&module[0x5E1], "CUD-FM-File - SEND A POSTCARD -", 31))
{
delete module;
delete[] module;
return false;
}
}
......
......@@ -148,7 +148,7 @@ CdtmLoader::load (VFSFile * fd, const CFileProvider & fp)
if (!unpacked_length)
{
delete pattern;
delete[] pattern;
fp.close (f);
return false;
}
......
......@@ -96,6 +96,12 @@ ChscPlayer::update ()
songend = 1;
}
if (pattnr >= 50 || pattpos >= 64)
{
fprintf (stderr, "hsc: Invalid pattnr (%d) or pattpos (%d)!\n", (int) pattnr, (int) pattpos);
return false;
}
pattoff = pattpos * 9;
for (chan = 0; chan < 9; chan++)
{ // handle all channels
......
......@@ -683,7 +683,7 @@ static const gchar *ffaudio_fmts[] = {
"wav",
/* Handle OGG streams (FLAC/Vorbis etc.) */
"ogg",
"ogg", "oga",
/* Speex */
"spx",
......
......@@ -13,5 +13,5 @@ include ../../extra.mk
plugindir := ${plugindir}/${OUTPUT_PLUGIN_DIR}
CFLAGS += ${PLUGIN_CFLAGS}
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${GLIB_CFLAGS} ${GTK_CFLAGS} ${FILEWRITER_CFLAGS} ${OGG_VORBIS_CFLAGS} -I../..
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${GLIB_CFLAGS} ${GTK_CFLAGS} ${FILEWRITER_CFLAGS} -I../..
LIBS += ${GTK_LIBS} ${FILEWRITER_LIBS}
......@@ -60,7 +60,7 @@ static int seek_cb(FLAC__IOHandle handle, FLAC__int64 offset, int whence)
{
if (vfs_fseek(handle, offset, whence) != 0)
{
FLACNG_ERROR("Could not seek to %lld!\n", (long long)offset);
FLACNG_ERROR("Could not seek to %ld!\n", (long)offset);
return -1;
}
......
......@@ -64,7 +64,7 @@ FLAC__StreamDecoderSeekStatus seek_callback(const FLAC__StreamDecoder *decoder,
if (vfs_fseek(info->fd, offset, SEEK_SET) != 0)
{
FLACNG_ERROR("Could not seek to %lld!\n", (long long)offset);
FLACNG_ERROR("Could not seek to %ld!\n", (long)offset);
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
}
......@@ -174,7 +174,7 @@ void metadata_callback(const FLAC__StreamDecoder *decoder, const FLAC__StreamMet
if (metadata->type == FLAC__METADATA_TYPE_STREAMINFO)
{
info->stream.samples = metadata->data.stream_info.total_samples;
AUDDBG("total_samples=%lld\n", (long long) metadata->data.stream_info.total_samples);
AUDDBG("total_samples=%ld\n", (long) metadata->data.stream_info.total_samples);
info->stream.bits_per_sample = metadata->data.stream_info.bits_per_sample;
AUDDBG("bits_per_sample=%d\n", metadata->data.stream_info.bits_per_sample);
......
......@@ -701,9 +701,12 @@ static gboolean init (void)
gint w = aud_get_int ("gtkui", "player_width");
gint h = aud_get_int ("gtkui", "player_height");
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size ((GtkWindow *) window, w, h);
gtk_window_set_keep_above ((GtkWindow *) window, aud_get_bool ("gtkui", "always_on_top"));
#if GTK_CHECK_VERSION (3, 0, 0)
gtk_window_set_has_resize_grip ((GtkWindow *) window, FALSE);
#endif
if (aud_get_bool ("gtkui", "save_window_position") && (x != -1 || y != -1))
gtk_window_move ((GtkWindow *) window, x, y);
......
......@@ -303,22 +303,22 @@ static void draw_title (cairo_t * cr)
if (area->title != NULL)
draw_text (area->main, cr, x, SPACING, width, 1, 1, 1, area->alpha,
"Sans 18", area->title);
"18", area->title);
if (area->last_title != NULL)
draw_text (area->main, cr, x, SPACING, width, 1, 1, 1, area->last_alpha,
"Sans 18", area->last_title);
"18", area->last_title);
if (area->artist != NULL)
draw_text (area->main, cr, x, SPACING + ICON_SIZE / 2, width, 1, 1, 1,
area->alpha, "Sans 9", area->artist);
area->alpha, "9", area->artist);
if (area->last_artist != NULL)
draw_text (area->main, cr, x, SPACING + ICON_SIZE / 2, width, 1, 1, 1,
area->last_alpha, "Sans 9", area->last_artist);
area->last_alpha, "9", area->last_artist);
if (area->album != NULL)
draw_text (area->main, cr, x, SPACING + ICON_SIZE * 3 / 4, width, 0.7,
0.7, 0.7, area->alpha, "Sans 9", area->album);
0.7, 0.7, area->alpha, "9", area->album);
if (area->last_album != NULL)
draw_text (area->main, cr, x, SPACING + ICON_SIZE * 3 / 4, width, 0.7,
0.7, 0.7, area->last_alpha, "Sans 9", area->last_album);
0.7, 0.7, area->last_alpha, "9", area->last_album);
}
#if GTK_CHECK_VERSION (3, 0, 0)
......
......@@ -27,7 +27,6 @@
#include <audacious/misc.h>
#include <audacious/playlist.h>
#include <audacious/plugin.h>
#include <audacious/i18n.h>
#include <libaudgui/list.h>
#include <libaudgui/libaudgui.h>
......@@ -63,7 +62,7 @@ static void make_add_button (GtkWidget * notebook)
GtkWidget * button = gtk_button_new ();
gtk_button_set_relief ((GtkButton *) button, GTK_RELIEF_NONE);
gtk_container_add ((GtkContainer *) button, gtk_image_new_from_stock
(GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON));
(GTK_STOCK_ADD, GTK_ICON_SIZE_MENU));
gtk_widget_set_can_focus (button, FALSE);
g_signal_connect (button, "clicked", (GCallback) add_button_cb, NULL);
......@@ -94,7 +93,6 @@ static GtkWidget * make_close_button (gint list)
gtk_button_set_relief ((GtkButton *) button, GTK_RELIEF_NONE);
gtk_button_set_focus_on_click ((GtkButton *) button, FALSE);
gtk_widget_set_name (button, "gtkui-tab-close-button");
gtk_widget_set_tooltip_text (button, _("Close"));
g_signal_connect (button, "clicked", (GCallback) close_button_cb,
GINT_TO_POINTER (aud_playlist_get_unique_id (list)));
......@@ -281,7 +279,7 @@ void ui_playlist_notebook_create_tab(gint playlist)
ebox = gtk_event_box_new();
gtk_event_box_set_visible_window ((GtkEventBox *) ebox, FALSE);
hbox = gtk_hbox_new (FALSE, 4);
hbox = gtk_hbox_new (FALSE, 2);
label = gtk_label_new ("");
set_tab_label (playlist, (GtkLabel *) label);
......@@ -535,13 +533,11 @@ static void destroy_cb (void)
reorder_handler = 0;
}
GtkWidget *ui_playlist_notebook_new()
GtkWidget * ui_playlist_notebook_new (void)
{
AUDDBG("playlist notebook create\n");
notebook = gtk_notebook_new();
gtk_notebook_set_scrollable(UI_PLAYLIST_NOTEBOOK, TRUE);
gtk_notebook_set_show_border(UI_PLAYLIST_NOTEBOOK, FALSE);
notebook = gtk_notebook_new ();
gtk_container_set_border_width ((GtkContainer *) notebook, 2);
gtk_notebook_set_scrollable ((GtkNotebook *) notebook, TRUE);
#ifdef HAVE_ADD_BUTTON
make_add_button (notebook);
......
......@@ -185,11 +185,18 @@ int32 psf_start(uint8 *buffer, uint32 length)
// now patch the file into RAM
offset = lib_decoded[0x18] | lib_decoded[0x19]<<8 | lib_decoded[0x1a]<<16 | lib_decoded[0x1b]<<24;
offset &= 0x3fffffff; // kill any MIPS cache segment indicators
plength = lib_decoded[0x1c] | lib_decoded[0x1d]<<8 | lib_decoded[0x1e]<<16 | lib_decoded[0x1f]<<24;
/* valid PS-X EXE image must be at least 2048 bytes, plength section may be wrong on
* shite rips... --nenolod */
if (lib_len < 2048)
plength = 0;
else
plength = lib_len - 2048;
#if DEBUG_LOADER
printf("library offset: %x plength: %d\n", offset, plength);
#endif
memcpy(&psx_ram[offset/4], lib_decoded+2048, plength);
memcpy(&psx_ram[offset/4], lib_decoded + 2048, plength);
// Dispose the corlett structure for the lib - we don't use it
free(lib);
......@@ -198,14 +205,13 @@ int32 psf_start(uint8 *buffer, uint32 length)
// now patch the main file into RAM OVER the libraries (but not the aux lib)
offset = file[0x18] | file[0x19]<<8 | file[0x1a]<<16 | file[0x1b]<<24;
offset &= 0x3fffffff; // kill any MIPS cache segment indicators
plength = file[0x1c] | file[0x1d]<<8 | file[0x1e]<<16 | file[0x1f]<<24;
// Philosoma has an illegal "plength". *sigh*
if (plength > (file_len-2048))
{
plength = file_len-2048;
}
memcpy(&psx_ram[offset/4], file+2048, plength);
if (file_len < 2048)
plength = 0;
else
plength = file_len - 2048;
memcpy(&psx_ram[offset/4], file + 2048, plength);
// load any auxiliary libraries now
for (i = 0; i < 8; i++)
......@@ -224,6 +230,9 @@ int32 psf_start(uint8 *buffer, uint32 length)
}
lib_raw_length = tmp_length;
if (lib_raw_file == NULL)
return AO_FAIL;
if (corlett_decode(lib_raw_file, lib_raw_length, &alib_decoded, &alib_len, &lib) != AO_SUCCESS)
{
free(lib_raw_file);
......@@ -251,8 +260,13 @@ int32 psf_start(uint8 *buffer, uint32 length)
// now patch the file into RAM
offset = alib_decoded[0x18] | alib_decoded[0x19]<<8 | alib_decoded[0x1a]<<16 | alib_decoded[0x1b]<<24;
offset &= 0x3fffffff; // kill any MIPS cache segment indicators
plength = alib_decoded[0x1c] | alib_decoded[0x1d]<<8 | alib_decoded[0x1e]<<16 | alib_decoded[0x1f]<<24;
memcpy(&psx_ram[offset/4], alib_decoded+2048, plength);
if (alib_len < 2048)
plength = 0;
else
plength = alib_len - 2048;
memcpy(&psx_ram[offset/4], alib_decoded + 2048, plength);
// Dispose the corlett structure for the lib - we don't use it
free(lib);
......
......@@ -486,6 +486,9 @@ int32 psf2_start(uint8 *buffer, uint32 length)
}
lib_raw_length = tmp_length;
if (lib_raw_file == NULL)
return AO_FAIL;
if (corlett_decode(lib_raw_file, lib_raw_length, &lib_decoded, &lib_len, &lib) != AO_SUCCESS)
{
free(lib_raw_file);
......
......@@ -675,7 +675,7 @@ static void pulse_about(void) {
static GtkWidget *dialog;
audgui_simple_message(& dialog, GTK_MESSAGE_INFO,
_("About Audacious PulseAudio Output Plugin"),
"Audacious PulseAudio Output Plugin\n\n "
"Audacious PulseAudio Output Plugin\n\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
......
......@@ -991,9 +991,9 @@ static void read_cache(void)
I_TIME (item), i, I_ALBUM (item));
}
free(artist);
free(title);
free(album);
g_free(artist);
g_free(title);
g_free(album);
i++;
}
g_strfreev(entry);
......
......@@ -631,7 +631,7 @@ static void refresh_cb (GtkButton * button, GtkWidget * chooser)
static void * search_get_widget (void)
{
GtkWidget * vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width ((GtkContainer *) vbox, 3);
gtk_container_set_border_width ((GtkContainer *) vbox, 2);
GtkWidget * entry = gtk_entry_new ();
#if GTK_CHECK_VERSION (2, 16, 0)
......
......@@ -128,7 +128,6 @@ static gboolean skins_init (void)
mainwin_show (config.player_visible);
eq_init_hooks ();
update_source = g_timeout_add (250, update_cb, NULL);
return TRUE;
......@@ -142,7 +141,6 @@ static void skins_cleanup (void)
mainwin_unhook ();
playlistwin_unhook ();
eq_end_hooks ();
g_source_remove (update_source);
skins_cfg_save();
......
This diff is collapsed.
......@@ -28,9 +28,6 @@
#include <gtk/gtk.h>
void eq_init_hooks (void);
void eq_end_hooks (void);
void equalizerwin_set_shape (void);
void equalizerwin_create(void);
void equalizerwin_show(gboolean show);
......
......@@ -10,5 +10,5 @@ include ../../extra.mk
plugindir := ${plugindir}/${INPUT_PLUGIN_DIR}
CFLAGS += ${PLUGIN_CFLAGS}
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${OGG_VORBIS_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} -I../..
LIBS += ${OGG_VORBIS_LIBS} ${GTK_LIBS} ${GLIB_LIBS}
CPPFLAGS += ${PLUGIN_CPPFLAGS} ${VORBIS_CFLAGS} ${GTK_CFLAGS} ${GLIB_CFLAGS} -I../..
LIBS += ${VORBIS_LIBS} ${GTK_LIBS} ${GLIB_LIBS}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment