rpms/audacious-plugins/devel audacious-plugins-1.5.1-sndfile-cleanup.patch, NONE, 1.1 audacious-plugins.spec, 1.35, 1.36
Michael Schwendt
mschwendt at fedoraproject.org
Thu Jun 4 19:01:36 UTC 2009
Author: mschwendt
Update of /cvs/pkgs/rpms/audacious-plugins/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12114
Modified Files:
audacious-plugins.spec
Added Files:
audacious-plugins-1.5.1-sndfile-cleanup.patch
Log Message:
* Thu Jun 4 2009 Michael Schwendt <mschwendt at fedoraproject.org>
- Build with libsndfile plugin for advanced formats in WAV and
patch it for pause and seek (also fixes #501007).
audacious-plugins-1.5.1-sndfile-cleanup.patch:
--- NEW FILE audacious-plugins-1.5.1-sndfile-cleanup.patch ---
diff -Nur audacious-plugins-fedora-1.5.1-orig/src/sndfile/plugin.c audacious-plugins-fedora-1.5.1/src/sndfile/plugin.c
--- audacious-plugins-fedora-1.5.1-orig/src/sndfile/plugin.c 2008-06-08 10:37:44.000000000 +0200
+++ audacious-plugins-fedora-1.5.1/src/sndfile/plugin.c 2009-05-14 04:42:00.000000000 +0200
@@ -47,6 +47,7 @@
static gint song_length;
static gint bit_rate = 0;
static glong seek_time = -1;
+static volatile char pause_flag;
static GThread *decode_thread;
static GMutex *decode_mutex;
@@ -121,6 +122,7 @@
plugin_init (void)
{
seek_time = -1;
+ pause_flag = 0;
decode_mutex = g_mutex_new();
decode_cond = g_cond_new();
@@ -362,6 +364,22 @@
return TRUE;
}
+static void do_seek (InputPlayback * playback) {
+ playback->output->flush (seek_time);
+ sf_seek (sndfile, (long long) seek_time * sfinfo.samplerate / 1000, SEEK_SET);
+ seek_time = -1;
+}
+
+static void do_pause (InputPlayback * playback) {
+ playback->output->pause (1);
+ while (pause_flag) {
+ if (seek_time != -1)
+ do_seek (playback);
+ g_usleep(50000);
+ }
+ playback->output->pause (0);
+}
+
static gpointer
play_loop (gpointer arg)
{
@@ -411,13 +429,10 @@
break;
}
- /* Do seek if seek_time is valid. */
- if (seek_time >= 0) {
- sf_seek (sndfile, (sf_count_t)((gint64)seek_time * (gint64)sfinfo.samplerate / 1000L),
- SEEK_SET);
- playback->output->flush (seek_time);
- seek_time = -1;
- }
+ if (seek_time != -1)
+ do_seek (playback);
+ if (pause_flag)
+ do_pause (playback);
if (playback->playing == FALSE)
break;
@@ -477,7 +492,7 @@
static void
play_pause (InputPlayback *playback, gshort p)
{
- playback->output->pause(p);
+ pause_flag = p;
}
static void
Index: audacious-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/devel/audacious-plugins.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -p -r1.35 -r1.36
--- audacious-plugins.spec 6 May 2009 17:52:17 -0000 1.35
+++ audacious-plugins.spec 4 Jun 2009 19:01:05 -0000 1.36
@@ -22,6 +22,7 @@ Patch4: audacious-plugins-1.5.1-
Patch5: audacious-plugins-1.5.1-timidity-cfg.patch
Patch6: audacious-plugins-1.5.1-amidi-symbol.patch
Patch7: audacious-plugins-1.5.1-neon-reader-error-crash.patch
+Patch8: audacious-plugins-1.5.1-sndfile-cleanup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: audacious-devel >= %{aud_ver}, esound-devel >= 0.2, libvorbis-devel >= 1.0
@@ -43,7 +44,7 @@ BuildRequires: libmowgli >= 0.5.0
BuildRequires: mcs-devel >= 0.6.0
BuildRequires: libcdio-devel >= 0.70
BuildRequires: libcddb-devel >= 1.2.1
-
+BuildRequires: libsndfile-devel
Requires: audacious >= %{aud_ver}
@@ -173,6 +174,9 @@ vortex compressed files.
# Patch possible neon crash on buffer underrun
%patch7 -p1 -b neon-reader-error-crash
+# pause and seek for libsndfile input plugin
+%patch8 -p1 -b .sndfile-cleanup
+
perl -pi -e 's/^\.SILENT:.*$//' buildsys.mk.in
%build
@@ -184,7 +188,6 @@ perl -pi -e 's/^\.SILENT:.*$//' buildsys
--disable-dependency-tracking \
--enable-amidiplug \
--disable-amidiplug-dummy \
- --disable-sndfile \
--disable-sse2 \
--enable-neon
@@ -269,6 +272,10 @@ update-desktop-database %{_datadir}/appl
%changelog
+* Thu Jun 4 2009 Michael Schwendt <mschwendt at fedoraproject.org>
+- Build with libsndfile plugin for advanced formats in WAV and
+ patch it for pause and seek (also fixes #501007).
+
* Wed May 06 2009 Ralf Ertzinger <ralf at skytale.net> 1.5.1-5
- Fix possible crash on neon buffer underrun (BZ#496413)
More information about the fedora-extras-commits
mailing list