I hope this is the right place to submit libao patches -- the freshmeat page points to ogg vorbis as the homepage for libao. Currently, at least on my system (SB Live Value!, ALSA .9 branch), stuff going to alsa sounds *awful* because of too-small buffers. mpg321 and similar programs are unusable, and none of them seem to want to let you set the buffer size. This patch lets an environment variable set the default buffer size. After applying this patch, "export AO_ALSA_BUFFER_SIZE=8000" makes things sound fine on my system, w/o an excessive amount of latency. I'm not on this list, so replies intended to go to me should be cc'd. -- Best of luck, Mark Schreiber -------------- next part -------------- Only in libao-0.8.2-new: Makefile Only in libao-0.8.2-new: Makefile~ Only in libao-0.8.2-new: backup-042020022049-pre-libao-0.8.2.tgz Only in libao-0.8.2-new: backup-042020022050-pre-libao-0.8.2.tgz Only in libao-0.8.2-new: backup-042020022053-pre-libao-0.8.2.tgz Only in libao-0.8.2-new: backup-042020022111-pre-libao-0.8.2.tgz Only in libao-0.8.2-new: config.cache Only in libao-0.8.2-new: config.log Only in libao-0.8.2-new: config.status Only in libao-0.8.2-new/debian: Makefile Only in libao-0.8.2-new/doc: Makefile Only in libao-0.8.2-new/include: Makefile Only in libao-0.8.2-new/include/ao: Makefile Only in libao-0.8.2-new: libtool Only in libao-0.8.2-new/src: .libs Only in libao-0.8.2-new/src: Makefile Only in libao-0.8.2-new/src: ao_au.lo Only in libao-0.8.2-new/src: ao_au.o Only in libao-0.8.2-new/src: ao_null.lo Only in libao-0.8.2-new/src: ao_null.o Only in libao-0.8.2-new/src: ao_raw.lo Only in libao-0.8.2-new/src: ao_raw.o Only in libao-0.8.2-new/src: ao_wav.lo Only in libao-0.8.2-new/src: ao_wav.o Only in libao-0.8.2-new/src: audio_out.lo Only in libao-0.8.2-new/src: audio_out.o Only in libao-0.8.2-new/src: config.lo Only in libao-0.8.2-new/src: config.o Only in libao-0.8.2-new/src: libao.la Only in libao-0.8.2-new/src/plugins: Makefile Only in libao-0.8.2-new/src/plugins/alsa: Makefile Only in libao-0.8.2-new/src/plugins/alsa09: .libs Only in libao-0.8.2-new/src/plugins/alsa09: Makefile diff -ur libao-0.8.2/src/plugins/alsa09/ao_alsa09.c libao-0.8.2-new/src/plugins/alsa09/ao_alsa09.c --- libao-0.8.2/src/plugins/alsa09/ao_alsa09.c Tue Dec 18 17:39:24 2001 +++ libao-0.8.2-new/src/plugins/alsa09/ao_alsa09.c Sat Apr 20 21:41:39 2002 @@ -90,17 +90,33 @@ return &ao_alsa_info; } +static int get_alsa_environment_buf_size(void) +{ + char * buf; + + buf = getenv("AO_ALSA_BUFFER_SIZE"); + if (buf == NULL) + return 0; + else + return strtol(buf, NULL, 10); +} int ao_plugin_device_init(ao_device *device) { ao_alsa_internal *internal; + int buf_size_env; internal = (ao_alsa_internal *) malloc(sizeof(ao_alsa_internal)); - if (internal == NULL) + if (internal == NULL) return 0; /* Could not initialize device memory */ - internal->buf_size = AO_ALSA_BUF_SIZE; + buf_size_env = get_alsa_environment_buf_size(); + if (buf_size_env) + internal->buf_size = buf_size_env; + else + internal->buf_size = AO_ALSA_BUF_SIZE; + internal->periods = AO_ALSA_PERIODS; internal->dev = strdup ("default"); if (!internal->dev) { Only in libao-0.8.2-new/src/plugins/alsa09: ao_alsa09.c~ Only in libao-0.8.2-new/src/plugins/alsa09: ao_alsa09.lo Only in libao-0.8.2-new/src/plugins/alsa09: ao_alsa09.o Only in libao-0.8.2-new/src/plugins/alsa09: libalsa09.la Only in libao-0.8.2-new/src/plugins/arts: Makefile Only in libao-0.8.2-new/src/plugins/esd: Makefile Only in libao-0.8.2-new/src/plugins/esd: libesd.la Only in libao-0.8.2-new/src/plugins/irix: Makefile Only in libao-0.8.2-new/src/plugins/macosx: Makefile Only in libao-0.8.2-new/src/plugins/oss: .libs Only in libao-0.8.2-new/src/plugins/oss: Makefile Only in libao-0.8.2-new/src/plugins/oss: ao_oss.lo Only in libao-0.8.2-new/src/plugins/oss: ao_oss.o Only in libao-0.8.2-new/src/plugins/oss: liboss.la Only in libao-0.8.2-new/src/plugins/sun: Makefile -------------- next part -------------- A non-text attachment was scrubbed... Name: part Type: application/pgp-signature Size: 233 bytes Desc: not available Url : http://lists.xiph.org/pipermail/vorbis-dev/attachments/20020727/fc1da26c/part-0001.pgp