[vorbis-dev] Re: Patches for NetBSD
Segher Boessenkool
segher at chello.nl
Sat Mar 17 01:47:35 PST 2001
"Jeremy C. Reed" wrote:
>
> 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.
Agreed.
> > --- ../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.
AUDIO_DEVICE_PATH ?
> > 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"?)
It is the delay between sending data to the device, and the device actually
playing it. Necessary/useful for faking "realtime" behaviour. I assume
NetBSD has something similar?
> > --- ../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.)
lazy sounds more useful to me... no use in loading libs we don't
actually use.
> > --- ../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?)
Something along the lines of:
if libdl found, AO_LIBS += -ldl
if libossaudio found, AO_LIBS += -lossaudio
Maybe check whether these libs are necessary, as well.
I'll leave this to the autoconf wizards :-)
> 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@
I don't know if this is actually correct. It depends on local
conventions; maybe BSD and Linux don't agree on this. Some
more configure checks can be added, of course.
> Of course, I need to provide more code (patches) for my above thoughts.
Not necessarily you. Someone with good knowledge of the build system
and cross-platform is needed for this. Just wanted to tell you to not
think this will go in as-is.
> Keep up the good work. (I can't wait until I can edit a "video" file.)
You keep it up as well :-)
Dagdag,
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 at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list