I submitted four new packages for the NetBSD pkgsrc collection: libao, libogg, libvorbis and vorbis-tools for 1.0beta4. The following is some of the patches needed for libao and vorbis-tools. Official Developers: When you receive patches or development suggestions can you please acknowledge them? (For example: "Noted.", "Thanks, but already done.", "Not necessary, because ...", "Interesting idea, but can you change ...", "Yes, will use for next release", "Your patch solves the problem, but there is a better way ...", etc.) The feedback doesn't need to be long, but would be nice for those who contribute. libao: $NetBSD: patch-aa,v 1.1.1.1 2001/03/15 20:35:58 wiz Exp $ --- configure.orig Sun Feb 25 20:58:48 2001 +++ configure Wed Mar 14 22:03:19 2001 @@ -2086,6 +2086,8 @@ HAVE_OSS_TRUE='#' HAVE_OSS_FALSE fi +HAVE_OSS_TRUE+HAVE_OSS_FALSE='#' echo $ac_n "checking for snd_pcm_open in -lasound""... $ac_c" 1>&6 $NetBSD: patch-ab,v 1.1.1.1 2001/03/15 20:35:58 wiz Exp $ --- ../libao-0.6.0.orig/src/plugins/oss/ao_oss.c Fri Feb 23 17:31:48 2001 +++ src/plugins/oss/ao_oss.c Wed Mar 14 22:12:22 2001 @@ -113,7 +113,7 @@ } } else { /* default: first try the devfs path */ - state->dev = strdup("/dev/sound/dsp"); + state->dev = strdup("/dev/audio"); state->fd=open(state->dev,O_WRONLY); if(state->fd < 0) { @@ -198,7 +198,7 @@ int plugin_get_latency(ao_internal_t *state) { int odelay = 0; - ioctl(((ao_oss_internal_t *)state)->fd, SNDCTL_DSP_GETODELAY, &odelay); +/* ioctl(((ao_oss_internal_t *)state)->fd, SNDCTL_DSP_GETODELAY, &odelay); */ return odelay; } $NetBSD: patch-ac,v 1.1.1.1 2001/03/15 20:35:58 wiz Exp $ --- ../libao-0.6.0.orig/src/audio_out.c Fri Feb 23 17:31:46 2001 +++ src/audio_out.c Thu Mar 15 10:21:55 2001 @@ -63,7 +63,7 @@ driver_tree_t *dt; void *handle; - handle = dlopen(plugin_file, RTLD_NOW); + handle = dlopen(plugin_file, DL_LAZY); if (handle) { dt = (driver_tree_t *)malloc(sizeof(driver_tree_t)); if (!dt) return NULL; $NetBSD: patch-ad,v 1.1 2001/03/16 10:10:35 wiz Exp $ --- src/ao_wav.c.orig Sat Feb 24 02:31:46 2001 +++ src/ao_wav.c @@ -221,7 +221,7 @@ /* Swap the bytes into the swap buffer (so we don't mess up the output_samples buffer) */ - for(i = 0; i < num_bytes/2; i+=2) { + for(i = 0; i < num_bytes; i+=2) { s->swap_buffer[i] = ((char *) output_samples)[i+1]; s->swap_buffer[i+1] = ((char *) output_samples)[i]; } vorbis-tools: $NetBSD: patch-aa,v 1.1.1.1 2001/03/15 20:53:06 wiz Exp $ --- ../vorbis-tools-1.0beta4.orig/configure Sun Feb 25 21:51:05 2001 +++ configure Thu Mar 15 09:52:40 2001 @@ -1822,7 +1822,7 @@ AO_LIBS="-L$ao_prefix/lib" fi - AO_LIBS="$AO_LIBS -lao -ldl" + AO_LIBS="$AO_LIBS -lao -lossaudio" echo $ac_n "checking for ao""... $ac_c" 1>&6 echo "configure:1829: checking for ao" >&5 $NetBSD: patch-ab,v 1.1.1.1 2001/03/15 20:53:06 wiz Exp $ --- ../vorbis-tools-1.0beta4.orig/ogg123/Makefile.in Mon Feb 26 03:02:14 2001 +++ ogg123/Makefile.in Sat Mar 10 03:47:13 2001 @@ -85,7 +85,7 @@ bin_PROGRAMS = ogg123 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) doc_DATA = ogg123rc-example -mandir = $(datadir)/man +mandir = $(prefix)/man man_MANS = ogg123.1 INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@ I hope this helps! Jeremy C. Reed http://www.reedmedia.net/ --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
At 10:57 PM 3/16/01 -0800, you wrote:>I submitted four new packages for the NetBSD pkgsrc collection: libao, >libogg, libvorbis and vorbis-tools for 1.0beta4.The patch to ao_wav.c was committed just before - thanks for finding this one. For the rest - the HAVE_OSS stuff I don't know about, since I don't know autoconf/automake well enough to have a clue what it does - one of the guys who does should take a look at this. Everything else is pretty clearly wrong for (at least) linux, and possibly other platforms that ogg123 runs on. They're presumably needed on netbsd, so it's fair to say they should be added - but not as-is. Patches should be contributed that fix platform-specific behaviour, not that change platform-specific things to different platform-specific things. Please, if you have the time, send us another patch which fixes these problems, or at least just changes things for platforms without the neccesary functions. Michael Michael --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Thank you Segher and Michael for your feedback. Sorry I was unclear about these patches. Yes -- they are not ready for putting back (just for NetBSD). One patch (the very bottom) is ready to use. I also have some notes below within the text:> --- configure.orig Sun Feb 25 20:58:48 2001 > +++ configure Wed Mar 14 22:03:19 2001 > @@ -2086,6 +2086,8 @@ > HAVE_OSS_TRUE='#' > HAVE_OSS_FALSE> fi > +HAVE_OSS_TRUE> +HAVE_OSS_FALSE='#'I forced this because it has two checks above for soundcard.h, but neither in the same location as NetBSD: /usr/include/soundcard.h. The configure.in (autoconf) should probably have one routine that does check for all three instead of two (or three) separate routines.> --- ../libao-0.6.0.orig/src/plugins/oss/ao_oss.c Fri Feb 23 17:31:48 2001 > +++ src/plugins/oss/ao_oss.c Wed Mar 14 22:12:22 2001 > @@ -113,7 +113,7 @@ > } > } else { > /* default: first try the devfs path */ > - state->dev = strdup("/dev/sound/dsp"); > + state->dev = strdup("/dev/audio");Maybe an autoconf can figure this out and then setup some -DDEVAUDIO or some other definitions.> int plugin_get_latency(ao_internal_t *state) > { > int odelay = 0; > - ioctl(((ao_oss_internal_t *)state)->fd, SNDCTL_DSP_GETODELAY, &odelay); > +/* ioctl(((ao_oss_internal_t *)state)->fd, SNDCTL_DSP_GETODELAY, &odelay); */ > return odelay;I don't know DSP. Maybe NetBSD should be fixed instead? (Please feel free to point me to source or documentation: what is SNDCTL_DSP_GETODELAY and "latency"?)> --- ../libao-0.6.0.orig/src/audio_out.c Fri Feb 23 17:31:46 2001 > +++ src/audio_out.c Thu Mar 15 10:21:55 2001 > @@ -63,7 +63,7 @@ > driver_tree_t *dt; > void *handle; > > - handle = dlopen(plugin_file, RTLD_NOW); > + handle = dlopen(plugin_file, DL_LAZY);I am not sure about this either. RTLD_NOW, I believe, must be true at build or link time; the DL_LAZY must work at run time. (But I don't know much about it.)> --- ../vorbis-tools-1.0beta4.orig/configure Sun Feb 25 21:51:05 2001 > +++ configure Thu Mar 15 09:52:40 2001 > @@ -1822,7 +1822,7 @@ > AO_LIBS="-L$ao_prefix/lib" > fi > > - AO_LIBS="$AO_LIBS -lao -ldl" > + AO_LIBS="$AO_LIBS -lao -lossaudio"autoconf needs to detect if it is a NetBSD (or OpenBSD?) system, because they don't use libdl (libdl is built-in). Also, (at least for me) libossaudio had to be linked here, because I didn't know how to get it to link with libao. Whenever I linked it, I received a message (from gcc or libtool or something) saying it wasn't used. (Any ideas?) And now one patch ready to use below :)> --- ../vorbis-tools-1.0beta4.orig/ogg123/Makefile.in Mon Feb 26 03:02:14 2001 > +++ ogg123/Makefile.in Sat Mar 10 03:47:13 2001 > @@ -85,7 +85,7 @@ > bin_PROGRAMS = ogg123 > docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) > doc_DATA = ogg123rc-example > -mandir = $(datadir)/man > +mandir = $(prefix)/man > man_MANS = ogg123.1 > > INCLUDES = @OGG_CFLAGS@ @VORBIS_CFLAGS@ @AO_CFLAGS@Of course, I need to provide more code (patches) for my above thoughts. Keep up the good work. (I can't wait until I can edit a "video" file.) Jeremy C. Reed http://www.reedmedia.net/ --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> Official Developers: When you receive patches or development suggestions > can you please acknowledge them? (For example: "Noted.", "Thanks, but > already done.", "Not necessary, because ...", "Interesting idea, but can > you change ...", "Yes, will use for next release", "Your patch > solves the problem, but there is a better way ...", etc.) The feedback > doesn't need to be long, but would be nice for those who contribute.Hi Jeremy, This is generally done, unless we are too busy. Monty is not here at the moment; that's not helpful, either. If you get no reply something is done, nothing has been done (except perhaps reading/thinking about it). Normally, this means it is still in the queue. You can mail here to question what has happened to it. Now, in this case, I don't think anyone will apply your patch as-is, as it destroys building/running on anything different from netbsd. If you put some #ifdef's around it, it stands a much bigger chance of going into the official tree soon. Or ask someone nicely (someone with CVS access; that's not me. I get away with it easily... har har). Oh, and you need a good configure test for NetBSD. Or detect all the specific features you use. Thanks for this work, btw. We _are_ friendly, you know :-) Cheers, Segher --- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'vorbis-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.