From: "Måns Rullgård" <mans@mansr.com>
To: Jan Stary <hans@stare.cz>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: Build system cleanup
Date: Thu, 27 Aug 2020 13:45:12 +0100 [thread overview]
Message-ID: <yw1xeensjm07.fsf@mansr.com> (raw)
In-Reply-To: <20200827124014.GA20713@www.stare.cz> (Jan Stary's message of "Thu, 27 Aug 2020 14:40:14 +0200")
Jan Stary <hans@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
next prev parent reply other threads:[~2020-08-27 12:45 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 9:21 Build system cleanup Jan Stary
2020-08-27 10:54 ` Jan Stary
2020-08-27 11:52 ` Måns Rullgård
2020-08-27 12:40 ` Jan Stary
2020-08-27 12:44 ` Jan Stary
2020-08-27 12:45 ` Måns Rullgård [this message]
2020-08-27 17:45 ` Jan Stary
2020-08-27 18:59 ` Måns Rullgård
2020-08-27 19:51 ` Jan Stary
2020-08-27 20:01 ` Jan Stary
2020-08-28 9:21 ` Måns Rullgård
2020-08-28 9:35 ` Jan Stary
2020-08-28 9:43 ` Måns Rullgård
-- strict thread matches above, loose matches on Subject: below --
2020-08-21 8:52 Jan Stary
2020-08-21 10:36 ` Måns Rullgård
2020-08-21 12:22 ` Jan Stary
2020-08-21 12:27 ` Måns Rullgård
2020-08-19 20:40 Måns Rullgård
2020-08-20 20:40 ` Wolfgang Stoeggl via SoX-devel
2020-08-20 21:22 ` Måns Rullgård
2020-08-20 22:15 ` Wolfgang Stoeggl via SoX-devel
2020-08-21 8:24 ` Jan Stary
2020-08-21 8:16 ` Jan Stary
2020-08-21 8:31 ` Jan Stary
2020-08-21 10:28 ` Måns Rullgård
2020-08-21 12:24 ` Jan Stary
2020-08-21 12:46 ` Måns Rullgård
2020-08-21 8:49 ` Jan Stary
2020-08-21 10:33 ` Måns Rullgård
2020-08-21 12:49 ` Jan Stary
2020-08-21 12:50 ` Jan Stary
2020-08-21 13:32 ` Måns Rullgård
2020-08-21 14:09 ` Jan Stary
2020-08-21 11:15 ` Måns Rullgård
2020-08-21 14:04 ` Jan Stary
2020-08-21 14:47 ` Måns Rullgård
2020-08-21 19:26 ` Wolfgang Stoeggl
2020-08-21 20:20 ` Jan Stary
2020-08-21 15:16 ` Jan Stary
2020-08-21 15:21 ` Jan Stary
2020-08-21 17:08 ` Måns Rullgård
2020-08-21 17:43 ` Jan Stary
2020-08-21 17:52 ` Måns Rullgård
2020-08-21 17:57 ` Jan Stary
2020-08-21 20:17 ` Jan Stary
2020-08-21 20:45 ` Jan Stary
2020-08-21 21:43 ` Måns Rullgård
2020-08-22 8:17 ` Jan Stary
2020-08-22 10:10 ` Måns Rullgård
2020-08-22 15:35 ` Jan Stary
2020-08-22 15:44 ` Jan Stary
2020-08-22 20:54 ` Måns Rullgård
2020-08-23 14:07 ` Jan Stary
2020-08-23 17:13 ` Måns Rullgård
2020-08-23 19:46 ` Jan Stary
2020-08-24 11:04 ` Måns Rullgård
2020-08-24 11:19 ` Jan Stary
2020-08-27 9:38 ` Jan Stary
2020-08-27 10:53 ` Måns Rullgård
2020-08-23 21:55 ` Jan Stary
2020-08-24 6:56 ` Jan Stary
2020-08-27 9:40 ` Jan Stary
2020-08-27 11:08 ` Måns Rullgård
2020-08-27 11:37 ` Jan Stary
2020-08-27 11:53 ` Måns Rullgård
2020-08-27 13:05 ` Jan Stary
2020-08-27 13:31 ` Måns Rullgård
2020-08-27 14:10 ` Jan Stary
2020-08-27 14:38 ` Jan Stary
2020-08-27 15:11 ` Måns Rullgård
2020-08-27 17:41 ` Jan Stary
2020-08-27 18:50 ` Måns Rullgård
2020-08-27 19:18 ` Jan Stary
2020-08-28 4:54 ` Jan Stary
2020-08-28 9:13 ` Måns Rullgård
2020-08-24 12:19 ` Måns Rullgård
2020-08-24 14:43 ` Jan Stary
2020-08-24 14:59 ` Måns Rullgård
2020-08-27 9:44 ` Jan Stary
2020-08-27 11:08 ` Måns Rullgård
2020-08-24 17:22 ` Måns Rullgård
2020-08-22 15:43 ` Jan Stary
2020-08-22 15:48 ` Jan Stary
2020-08-24 12:18 ` Jan Stary
2020-08-24 12:27 ` Måns Rullgård
2020-08-24 13:16 ` Jan Stary
2020-08-24 14:15 ` Måns Rullgård
2020-08-27 9:52 ` Jan Stary
2020-08-27 11:10 ` Måns Rullgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yw1xeensjm07.fsf@mansr.com \
--to=sox-devel@lists.sourceforge.net \
--cc=hans@stare.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).