Jan Stary <h...@stare.cz> writes: >> > checking for strdup... yes >> > >> > Not specific to NetBSD of course, but why are we running these >> > tests (taking strdup as a random example)? Is there a POSIX >> > system without strdup? And if we miss strdup, then what? >> > With that configure.ac line changed to check for xstrdup instead, >> > this will just become >> > >> > checking for xstrdup... no >> > >> > but everyting follows as before. Which means we have checked for >> > a function (via AC_CHECK_FUNCS), found out it does not exist, >> > and ignored the result. What is that for? >> >> I already explained this about five times. > > The only explanation I have seen so far is > "it was warranted in the olden days". Perhaps it was; > but why are we checking for e.g. strdup() in 2020 > (and ingoring the result of AC_CHECK_FUNCS anyway)?
It's there because I haven't got around to removing it yet. It's harmless for now. >> > checking for sys/soundcard.h... yes >> > >> > On NetBSD, sys/soundcard.h says >> > >> > This is an OSS (Linux) audio emulator. >> > Use the Native NetBSD API for developing new code, >> > and this only for compiling Linux programs. >> > >> > The check is >> > >> > SOX_FMT_HEADERS([oss], [sys/soundcard.h], [SOUND_MIXER_MUTE], >> > [], [devices]) >> > >> > so at least we correctly recognize this as OSS emulation. >> > But the check does not work universaly: NetBSD has >> > /usr/include/sys/soundcard.h -> ../soundcard.h, but e.g. >> > OpenBSD only has /usr/include/soundcard.h (same code though). >> > Apparently, the name makes a difference: >> > a test for "sys/soundcard.h" will fail on OpenBSD. >> > >> > checking whether SOUND_MIXER_MUTE is declared... no >> > >> > Why SOUND_MIXER_MUTE, specificaly, out of all the others? >> > For example, SOUND_MIXER_INFO is declared, which would >> > make the oss emulation detected (not saying this is >> > the correct test). >> > >> > Lastly, oss requires a library to be linked: >> > https://netbsd.gw.com/cgi-bin/man-cgi?ossaudio >> > That would be /usr/lib/libossaudio.so - I believe a recent >> > commit has concluded that oss does not require any library >> > (being a bunch of defined ioctls); on NetBSD, it maybe does. >> > >> > $ nm /usr/lib/libossaudio.so | grep oss >> > 0000000000001f60 T _oss_ioctl >> >> Real OSS does _not_ need a library. That is _only_ used for the >> incomplete emulation that we don't want. The test is chosen such that >> it passes on Linux, FreeBSD, and Solaris while failing on NetBSD and >> OpenBSD. > > In case it is intended to detect OSS as not present > on OpenBSD and NetBSD (who only emulate OSS), > it seems to work as intended. That was the intention. >> > checking for sys/audioio.h... yes >> > >> > This seems to be NetBSD's native audio interface. >> > https://netbsd.gw.com/cgi-bin/man-cgi?audio >> > It's what the NetBSD port of SoX uses: >> > http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/audio/sox/ >> > >> > checking whether AUDIO_HWFEATURE_DUPLEX is declared... no >> > >> > ... but we miss that, because of this. >> > It seems NetBSD's audio system came from Sun audio >> > (/usr/pkg/bin/sox reports AUDIO DEVICE DRIVERS: sunau), >> > but it's not quite the same; in particular, >> > AUDIO_HWFEATURE_DUPLEX is not defined. >> >> Already fixed. > > The detectin works, thanks: > > Audio devices: > alsa no > ao no > coreaudio no > oss no > pulseaudio no > sndio no > sunaudio yes > waveaudio no > > It doesn't actually play though: > > $ play -V -n -b 16 synth 1 > play INFO sunaudio: Sun Audio driver only supports bytes and words > play: SoX v14.4.2 > play INFO nulfile: sample rate not specified; using 48000 > > Input File : '' (null) > Channels : 1 > Sample Rate : 48000 > Precision : 32-bit > > Output File : 'default' (sunau) > Channels : 1 > Sample Rate : 48000 > Precision : 16-bit > Sample Encoding: 16-bit Signed Integer PCM > Endian Type : little > Reverse Nibbles: no > Reverse Bits : no > > play INFO sox: effects chain: input 48000Hz 1 channels > play INFO sox: effects chain: synth 48000Hz 1 channels > play INFO sox: effects chain: dither 48000Hz 1 channels > play INFO sox: effects chain: output 48000Hz 1 channels > In:0.00% 00:00:00.00 [00:00:00.00] Out:0 [ | ] > Clip:0 Memory fault (core dumped) Already fixed. -- Måns Rullgård _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel