On Tue, 05 Oct 2010, Jacob Meuser wrote:

> On Tue, Oct 05, 2010 at 07:06:30PM +0000, Jacob Meuser wrote:
> > On Mon, Oct 04, 2010 at 05:57:50PM +0200, Tobias Ulmer wrote:
> > > I'm against adding any cargo cult stuff like this and would rather see
> > > someone who knows aucat and the audio stuff figure out why it skips and
> > > clicks like mad. I doubt it's mpds fault.
> > 
> > maybe try setting "write_size" to something considerably larger than
> > 1024?
> 
> or remove this "write_size" constraint completely.  none of the other
> audio output backends in mpd have this hack.

So... Can commit the following diff?

Ciao, 
david

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/mpd/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile    19 Oct 2010 19:45:53 -0000      1.27
+++ Makefile    26 Oct 2010 07:28:39 -0000
@@ -2,6 +2,7 @@
 
 COMMENT =              Music Player Daemon
 DISTNAME =             mpd-0.15.12
+REVISION =             0
 CATEGORIES =           audio
 HOMEPAGE =             http://www.musicpd.org/
 MAINTAINER =           Tobias Ulmer <tobi...@tmux.org>
Index: patches/patch-doc_mpd_conf_5
===================================================================
RCS file: patches/patch-doc_mpd_conf_5
diff -N patches/patch-doc_mpd_conf_5
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_mpd_conf_5        26 Oct 2010 07:28:39 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+--- doc/mpd.conf.5.orig        Thu Oct  7 20:47:53 2010
++++ doc/mpd.conf.5     Thu Oct  7 20:48:45 2010
+@@ -383,11 +383,6 @@ for available options for some commonly used drivers. 
+ using "=", and ";" is used to separate options.  An example for oss:
+ "dsp=/dev/dsp".  An example for alsa09: "dev=hw:0,0;buf_size=4096".  The
+ default is "".
+-.TP
+-.B write_size <size in bytes>
+-This specifies how many bytes to write to the audio device at once.  This
+-parameter is to work around a bug in older versions of libao on sound cards
+-with very small buffers.  The default is 1024.
+ .SH REQUIRED FIFO OUTPUT PARAMETERS
+ .TP
+ .B path <path>
Index: patches/patch-src_output_ao_plugin_c
===================================================================
RCS file: /cvs/ports/audio/mpd/patches/patch-src_output_ao_plugin_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_output_ao_plugin_c
--- patches/patch-src_output_ao_plugin_c        3 Jun 2010 16:06:07 -0000       
1.1
+++ patches/patch-src_output_ao_plugin_c        26 Oct 2010 07:28:39 -0000
@@ -1,7 +1,28 @@
 $OpenBSD: patch-src_output_ao_plugin_c,v 1.1 2010/06/03 16:06:07 pea Exp $
---- src/output/ao_plugin.c.orig        Fri May 14 23:58:27 2010
-+++ src/output/ao_plugin.c     Fri May 14 23:58:58 2010
-@@ -169,6 +169,7 @@ ao_output_open(void *data, struct audio_format *audio_
+
+Fix after recent libao update
+Remove write_size constraint for better performances
+
+--- src/output/ao_plugin.c.orig        Wed Jul 21 02:42:13 2010
++++ src/output/ao_plugin.c     Thu Oct  7 18:21:03 2010
+@@ -28,7 +28,6 @@
+ static unsigned ao_output_ref;
+ 
+ struct ao_data {
+-      size_t write_size;
+       int driver;
+       ao_option *options;
+       ao_device *device;
+@@ -85,8 +84,6 @@ ao_output_init(G_GNUC_UNUSED const struct audio_format
+ 
+       ad->options = NULL;
+ 
+-      ad->write_size = config_get_block_unsigned(param, "write_size", 1024);
+-
+       if (ao_output_ref == 0) {
+               ao_initialize();
+       }
+@@ -169,6 +166,7 @@ ao_output_open(void *data, struct audio_format *audio_
        ao_sample_format format;
        struct ao_data *ad = (struct ao_data *)data;
  
@@ -9,3 +30,13 @@ $OpenBSD: patch-src_output_ao_plugin_c,v
        /* support for 24 bit samples in libao is currently dubious,
           and until we have sorted that out, resample everything to
           16 bit */
+@@ -212,9 +210,6 @@ ao_output_play(void *data, const void *chunk, size_t s
+              GError **error)
+ {
+       struct ao_data *ad = (struct ao_data *)data;
+-
+-      if (size > ad->write_size)
+-              size = ad->write_size;
+ 
+       if (ao_play_deconst(ad->device, chunk, size) == 0) {
+               ao_output_error(error);

Reply via email to