rpms/audacious-plugins/F-11 audacious-plugins-1.5.1-underruns.patch, 1.1, 1.2 audacious-plugins.spec, 1.41, 1.42
Michael Schwendt
mschwendt at fedoraproject.org
Mon Oct 26 11:26:53 UTC 2009
Author: mschwendt
Update of /cvs/pkgs/rpms/audacious-plugins/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6122
Modified Files:
audacious-plugins-1.5.1-underruns.patch audacious-plugins.spec
Log Message:
* Wed Oct 21 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-14
- Set buffer_time_min in underruns patch. Depend on default buffer size.
audacious-plugins-1.5.1-underruns.patch:
alsa-core.c | 48 +++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 41 insertions(+), 7 deletions(-)
Index: audacious-plugins-1.5.1-underruns.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-11/audacious-plugins-1.5.1-underruns.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- audacious-plugins-1.5.1-underruns.patch 19 Sep 2009 14:06:53 -0000 1.1
+++ audacious-plugins-1.5.1-underruns.patch 26 Oct 2009 11:26:53 -0000 1.2
@@ -1,6 +1,6 @@
-diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c
---- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-09-19 12:46:20.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c 2009-09-19 15:52:28.000000000 +0200
+diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng-mixer/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c
+--- audacious-plugins-fedora-1.5.1-alsa-ng-mixer/src/alsa/alsa-core.c 2009-09-19 12:54:29.476615457 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c 2009-10-26 12:12:39.000000000 +0100
@@ -27,6 +27,10 @@
static gboolean pcm_going = FALSE;
static GThread *audio_thread = NULL;
@@ -12,7 +12,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
static gsize wr_total = 0;
static gsize wr_hwframes = 0;
-@@ -219,6 +228,9 @@
+@@ -224,6 +228,9 @@
}
else
{
@@ -22,7 +22,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
gint err = snd_pcm_recover(pcm_handle, wr_frames, 1);
_DEBUG ("snd_pcm_writei error: %s", snd_strerror (wr_frames));
-@@ -235,7 +247,7 @@
+@@ -240,7 +247,7 @@
static gpointer
alsaplug_loop(gpointer unused)
{
@@ -31,7 +31,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
int size;
while (pcm_going)
-@@ -245,6 +257,7 @@
+@@ -250,6 +257,7 @@
if (flush_request != -1)
{
alsaplug_ringbuffer_reset (& pcm_ringbuf);
@@ -39,7 +39,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
snd_pcm_drop(pcm_handle);
snd_pcm_prepare(pcm_handle);
wr_total = flush_request * (long long) bps / 1000;
-@@ -262,12 +275,25 @@
+@@ -267,12 +275,25 @@
continue;
}
@@ -69,7 +69,43 @@ diff -Nur audacious-plugins-fedora-1.5.1
}
snd_pcm_drain(pcm_handle);
-@@ -362,6 +388,13 @@
+@@ -324,9 +345,10 @@
+ static gint
+ alsaplug_open_audio(AFormat fmt, gint rate, gint nch)
+ {
+- gint err, bitwidth, ringbuf_size, buf_size;
++ gint err, bitwidth, ringbuf_size, buf_size, buf_size_norm;
+ snd_pcm_format_t afmt;
+ snd_pcm_hw_params_t *hwparams = NULL;
++ guint buf_time_min;
+
+ afmt = alsaplug_format_convert(fmt);
+ if (afmt == SND_PCM_FORMAT_UNKNOWN)
+@@ -345,6 +367,10 @@
+ return -1;
+ }
+
++ buf_size = MAX(aud_cfg->output_buffer_size, 100);
++ buf_size_norm = MAX(buf_size-400, 100);
++ buf_time_min = buf_size_norm * 1000;
++
+ snd_pcm_hw_params_alloca(&hwparams);
+ snd_pcm_hw_params_any(pcm_handle, hwparams);
+ CHECK_FAIL (snd_pcm_hw_params_set_access (pcm_handle, hwparams,
+@@ -355,18 +381,25 @@
+ "snd_pcm_hw_params_set_channels");
+ CHECK_FAIL (snd_pcm_hw_params_set_rate (pcm_handle, hwparams, rate, 0),
+ "snd_pcm_hw_params_set_rate");
++ snd_pcm_hw_params_set_buffer_time_min (pcm_handle, hwparams, &buf_time_min, 0);
+ CHECK_FAIL (snd_pcm_hw_params (pcm_handle, hwparams), "snd_pcm_hw_params");
+
+ bitwidth = snd_pcm_format_physical_width(afmt);
+ bps = (rate * bitwidth * nch) >> 3;
+
+- buf_size = MAX(aud_cfg->output_buffer_size, 100);
+ ringbuf_size = buf_size * bps / 1000;
+
+ if (alsaplug_ringbuffer_init(&pcm_ringbuf, ringbuf_size) == -1) {
_ERROR("alsaplug_ringbuffer_init failed");
return -1;
}
@@ -83,7 +119,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
pcm_going = TRUE;
flush_request = -1;
paused = FALSE;
-@@ -504,6 +537,7 @@
+@@ -509,6 +542,7 @@
{
g_mutex_lock (pcm_state_mutex);
paused = p;
Index: audacious-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-11/audacious-plugins.spec,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -p -r1.41 -r1.42
--- audacious-plugins.spec 21 Oct 2009 20:51:56 -0000 1.41
+++ audacious-plugins.spec 26 Oct 2009 11:26:53 -0000 1.42
@@ -4,7 +4,7 @@
Name: audacious-plugins
Version: 1.5.1
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Plugins for the Audacious media player
Group: Applications/Multimedia
@@ -280,6 +280,9 @@ update-desktop-database &> /dev/null ||
%changelog
+* Wed Oct 21 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-14
+- Set buffer_time_min in underruns patch. Depend on default buffer size.
+
* Wed Oct 21 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-13
- Patch pulseaudio plugin to not suffer from precision loss when
calculating the volume level to save.
More information about the fedora-extras-commits
mailing list