[audacious-plugin-fc] Port to Audacious 3.1 Preferences API. Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.

Michael Schwendt mschwendt at fedoraproject.org
Thu Oct 13 21:26:59 UTC 2011


commit 3a3a3bfc55bff65c72673697ed76f0cf3e7b3127
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date:   Thu Oct 13 23:26:55 2011 +0200

    Port to Audacious 3.1 Preferences API.
    Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.

 audacious-plugin-fc-0.6-aud31.patch |   78 +++++++++++++++++++++++++++++++++++
 audacious-plugin-fc.spec            |    9 ++++-
 2 files changed, 86 insertions(+), 1 deletions(-)
---
diff --git a/audacious-plugin-fc-0.6-aud31.patch b/audacious-plugin-fc-0.6-aud31.patch
new file mode 100644
index 0000000..6c83a23
--- /dev/null
+++ b/audacious-plugin-fc-0.6-aud31.patch
@@ -0,0 +1,78 @@
+diff -Nur audacious-plugin-fc-0.6-aud30/src/configure.c audacious-plugin-fc-0.6-aud31/src/configure.c
+--- audacious-plugin-fc-0.6-aud30/src/configure.c	2011-10-13 23:17:11.000000000 +0200
++++ audacious-plugin-fc-0.6-aud31/src/configure.c	2011-10-13 23:21:35.405306867 +0200
+@@ -1,4 +1,3 @@
+-#include <audacious/configdb.h>
+ #include <audacious/plugin.h>
+ #include <audacious/preferences.h>
+ #include <glib.h>
+@@ -8,26 +7,20 @@
+ FCpluginConfig fc_myConfig;
+ FCpluginConfig config;
+ 
+-static gchar configSection[] = "FutureComposer";
++static gchar const configSection[] = "FutureComposer";
+ 
+ static const gint FREQ_SAMPLE_48 = 48000;
+ static const gint FREQ_SAMPLE_44 = 44100;
+ static const gint FREQ_SAMPLE_22 = 22050;
+ 
+ void fc_ip_load_config() {
+-    mcs_handle_t *cfg;
+-
+     fc_myConfig.frequency = FREQ_SAMPLE_44;
+     fc_myConfig.precision = 8;
+     fc_myConfig.channels = 1;
+     
+-    if ((cfg = aud_cfg_db_open())) {
+-        aud_cfg_db_get_int(cfg, configSection, "frequency", &fc_myConfig.frequency);
+-        aud_cfg_db_get_int(cfg, configSection, "precision", &fc_myConfig.precision);
+-        aud_cfg_db_get_int(cfg, configSection, "channels", &fc_myConfig.channels);
+-
+-        aud_cfg_db_close(cfg);
+-    }
++    fc_myConfig.frequency = aud_get_int(configSection, "frequency");
++    fc_myConfig.precision = aud_get_int(configSection, "precision");
++    fc_myConfig.channels = aud_get_int(configSection, "channels");
+ 
+     fc_myConfig.freq48 = fc_myConfig.freq44 = fc_myConfig.freq22 = FALSE;
+     fc_myConfig.bits16 = fc_myConfig.bits8 = FALSE;
+@@ -65,14 +58,9 @@
+ }
+ 
+ static void fc_ip_config_save() {
+-    mcs_handle_t *cfg;
+-
+-    if ((cfg = aud_cfg_db_open())) {
+-        aud_cfg_db_set_int(cfg, configSection, "frequency", fc_myConfig.frequency);
+-        aud_cfg_db_set_int(cfg, configSection, "precision", fc_myConfig.precision);
+-        aud_cfg_db_set_int(cfg, configSection, "channels", fc_myConfig.channels);
+-        aud_cfg_db_close(cfg);
+-    }
++    aud_set_int(configSection, "frequency", fc_myConfig.frequency);
++    aud_set_int(configSection, "precision", fc_myConfig.precision);
++    aud_set_int(configSection, "channels", fc_myConfig.channels);
+ }
+ 
+ static void configure_apply() {
+@@ -126,16 +114,16 @@
+ };
+ 
+ static PreferencesWidget prefs_top_row[] = {
+-    {WIDGET_BOX, "Frequency [Hz]:", NULL, NULL, NULL, FALSE,
++    {WIDGET_BOX, "Frequency [Hz]:", NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+      {.box = {prefs_frequency, G_N_ELEMENTS(prefs_frequency), FALSE, TRUE}}},
+-    {WIDGET_BOX, "Precision [bits]:", NULL, NULL, NULL, FALSE,
++    {WIDGET_BOX, "Precision [bits]:", NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+      {.box = {prefs_precision, G_N_ELEMENTS(prefs_precision), FALSE, TRUE}}},
+-    {WIDGET_BOX, "Channels:", NULL, NULL, NULL, FALSE,
++    {WIDGET_BOX, "Channels:", NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+      {.box = {prefs_channels, G_N_ELEMENTS(prefs_channels), FALSE, TRUE}}},
+ };
+ 
+ static PreferencesWidget prefs[] = {
+-    {WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE,
++    {WIDGET_BOX, NULL, NULL, NULL, NULL, FALSE, VALUE_NULL, NULL, NULL,
+      {.box = {prefs_top_row, G_N_ELEMENTS(prefs_top_row), TRUE, FALSE}}},
+ };
+ 
diff --git a/audacious-plugin-fc.spec b/audacious-plugin-fc.spec
index 2031681..0c7380d 100644
--- a/audacious-plugin-fc.spec
+++ b/audacious-plugin-fc.spec
@@ -9,13 +9,15 @@
 Summary: Future Composer input plugin for Audacious
 Name: audacious-plugin-fc
 Version: 0.6
-Release: 11%{?dist}
+Release: 12%{?dist}
 Provides: audacious-plugins-fc = %{version}-%{release}
 URL: http://xmms-fc.sourceforge.net/
 License: GPLv2+
 Source:	http://downloads.sourceforge.net/xmms-fc/audacious-plugin-fc-%{version}.tar.bz2
 # post 0.6.1
 Patch0: audacious-plugin-fc-0.6-aud30.patch
+# port to Audacious 3.1 API
+Patch1: audacious-plugin-fc-0.6-aud31.patch
 Group: Applications/Multimedia
 
 BuildRequires: audacious-devel
@@ -34,6 +36,7 @@ music files from AMIGA. Song-length detection and seek are implemented, too.
 
 %setup -q
 %patch0 -p1 -b .aud30
+%patch1 -p1 -b .aud31
 
 
 %build
@@ -52,6 +55,10 @@ make DESTDIR=${RPM_BUILD_ROOT} install
 
 
 %changelog
+* Thu Oct 13 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-12
+- Port to Audacious 3.1 Preferences API.
+- Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.
+
 * Wed Oct 12 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 0.6-11
 - Rebuild for Audacious 3.1-beta1 generic plugin API/ABI bump.
 


More information about the scm-commits mailing list