diff --git a/audacious-3.6.1-equalizer-bug535.patch b/audacious-3.6.1-equalizer-bug535.patch new file mode 100644 index 0000000..548f32f --- /dev/null +++ b/audacious-3.6.1-equalizer-bug535.patch @@ -0,0 +1,45 @@ +diff -Nur audacious-3.6.1-orig/src/libaudcore/equalizer.cc audacious-3.6.1/src/libaudcore/equalizer.cc +--- audacious-3.6.1-orig/src/libaudcore/equalizer.cc 2015-04-04 02:00:19.000000000 +0200 ++++ audacious-3.6.1/src/libaudcore/equalizer.cc 2015-05-26 21:25:49.229416409 +0200 +@@ -1,7 +1,7 @@ + /* + * equalizer.c + * Copyright 2001 Anders Johansson +- * Copyright 2010-2011 John Lindgren ++ * Copyright 2010-2015 John Lindgren + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: +@@ -57,10 +57,10 @@ + static int K; /* Number of used EQ bands */ + + /* 2nd order band-pass filter design */ +-static void bp2 (float *a, float *b, float fc, float q) ++static void bp2 (float *a, float *b, float fc) + { + float th = 2 * M_PI * fc; +- float C = (1 - tanf (th * q / 2)) / (1 + tanf (th * q / 2)); ++ float C = (1 - tanf (th * Q / 2)) / (1 + tanf (th * Q / 2)); + + a[0] = (1 + C) * cosf (th); + a[1] = -C; +@@ -75,15 +75,16 @@ + channels = new_channels; + rate = new_rate; + +- /* Calculate number of active filters */ ++ /* Calculate number of active filters: the center frequency must be less ++ * than rate/2Q to avoid singularities in the tangent used in bp2() */ + K = AUD_EQ_NBANDS; + +- while (CF[K - 1] > (float) rate / 2.2) ++ while (K > 0 && CF[K - 1] > (float) rate / (2.005 * Q)) + K --; + + /* Generate filter taps */ + for (int k = 0; k < K; k ++) +- bp2 (a[k], b[k], CF[k] / (float) rate, Q); ++ bp2 (a[k], b[k], CF[k] / (float) rate); + + /* Reset state */ + memset (wqv[0][0], 0, sizeof wqv); diff --git a/audacious.spec b/audacious.spec index 24aa781..ef46f51 100644 --- a/audacious.spec +++ b/audacious.spec @@ -7,7 +7,7 @@ Name: audacious Version: 3.6.1 -Release: 3%{?dist} +Release: 4%{?dist} %if %{with gtk2} %global tar_ver %{version} @@ -27,6 +27,9 @@ Group: Applications/Multimedia Source0: http://distfiles.audacious-media-player.org/%{name}-%{tar_ver}.tar.bz2 +# post-3.6.1 +Patch0: audacious-3.6.1-equalizer-bug535.patch + # for /usr/bin/appstream-util BuildRequires: libappstream-glib @@ -108,6 +111,7 @@ Files needed when building software for the Audacious audio player. %prep %setup -q -n %{name}-%{tar_ver} +%patch0 -p1 -b .equalizer-bug535 # Verify the value of the audacious(plugin-api) Provides. api=$(grep '[ ]*#define[ ]*_AUD_PLUGIN_VERSION[ ]\+' src/libaudcore/plugin.h | sed 's!.*_AUD_PLUGIN_VERSION[ ]*\([0-9]\+\).*!\1!') @@ -201,6 +205,9 @@ fi %changelog +* Tue May 26 2015 Michael Schwendt - 3.6.1-4 +- Merge fix for upstream bug 535 equalizer silencing some files. + * Tue May 26 2015 Michael Schwendt - 3.6.1-3 - Require gnome-icon-theme instead of adwaita-icon-theme.