sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Jan Stary <hans@stare.cz>
To: sox-devel@lists.sourceforge.net
Subject: Re: [PATCH] oss: remove check for machine/soundcard.h and libossaudio
Date: Tue, 11 Aug 2020 15:34:07 +0200	[thread overview]
Message-ID: <20200811133407.GA88171@www.stare.cz> (raw)
In-Reply-To: <20200810121707.29623-1-mans@mansr.com>

This is OpenBSD/current.

On Aug 10 13:17:07, mans@mansr.com wrote:
> Near as I can tell, no system actually has a machine/soundcard.h file.

OpenBSD has neither <machine/soundcard.h> nor <sys/soundcard.h>;
it has <soundcard.h>, as documented in http://man.openbsd.org/ossaudio

> The libossaudio library on NetBSD and OpenBSD is meant to emulate a
> few ioctl() commands to facilitate porting of Linux applications.

Yes.

> As we have proper sndio support, this is of no use for SoX.

On OpenBSD, yes (I will look at NetBSD and FreeBSD in separate emails).
Current SoX git builds and runs fine on OpenBSD
(except the recent -Wl,--as-needed) using sndio,
if ./configure'd right. The OpenBSD port of SoX 14.4.2
http://cvsweb.openbsd.org/ports/audio/sox/Makefile?rev=1.72
explicitly builds --without-oss	--without-sunaudio --with-sndio

In fact, these options are necessary (that is to say,
the autodetection is broken); when ./configure'd without options,
it detects each of sndio, ossaudio and sunaudio, and fails with

sox.c: In function 'adjust_volume':
sox.c:1337: error: 'audio_info_t' undeclared (first use in this function)
sox.c:1337: error: (Each undeclared identifier is reported only once
sox.c:1337: error: for each function it appears in.)
sox.c:1337: error: expected ';' before 'audio_info'
sox.c:1338: error: 'AUDIO_GETINFO' undeclared (first use in this function)
sox.c:1338: error: 'audio_info' undeclared (first use in this function)
sox.c:1341: warning: implicit declaration of function 'AUDIO_INITINFO'
sox.c:1345: error: 'AUDIO_SETINFO' undeclared (first use in this function)

(These are artifacts of sunaudio, right?)
A naive 'grep -Fr audio_info_t .' reveals that SoX ships with

	src/bit-rot/
	src/bit-rot/CoreAudio
	src/bit-rot/CoreAudio/CoreAudio.h
	src/bit-rot/mmreg.h
	src/bit-rot/mmsystem.h
	src/bit-rot/sndio.h
	src/bit-rot/sys
	src/bit-rot/sys/audioio.h
	src/bit-rot/windows.h

What are these for?

> ---
> Are there any BSD users here who can comment on this?
> ---
>  configure.ac | 5 +----
>  src/oss.c    | 3 ---
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index b1440560181c..9f55b5f8a55c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -609,10 +609,7 @@ AC_OPTIONAL_FORMAT(sndfile, SNDFILE, [using_sndfile=$tmp_using_sndfile])
>  
>  
>  
> -AC_OPTIONAL_FORMAT(oss, OSS, [AC_CHECK_HEADERS(sys/soundcard.h,,
> -      [AC_CHECK_HEADERS(machine/soundcard.h,
> -	  [AC_CHECK_LIB(ossaudio, _oss_ioctl, OSS_LIBS="$OSS_LIBS -lossaudio")],
> -	  using_oss=no)])])
> +AC_OPTIONAL_FORMAT(oss, OSS, [AC_CHECK_HEADERS(sys/soundcard.h,, uing_oss=no)])

Apparently, the presence of <sys/soundcard.h> is not
a correct test of ossaudio being available in the system.

'uing_oss' is a typo I guess.

(God I hate autotools.)

	Jan



_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

  reply	other threads:[~2020-08-11 13:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 12:17 [PATCH] oss: remove check for machine/soundcard.h and libossaudio Mans Rullgard
2020-08-11 13:34 ` Jan Stary [this message]
2020-08-11 13:41   ` Jan Stary
2020-08-11 14:14     ` Måns Rullgård
2020-08-11 14:33       ` Jan Stary
2020-08-11 14:39         ` Måns Rullgård
2020-08-11 13:58   ` Måns Rullgård
2020-08-11 14:40     ` Jan Stary
2020-08-11 15:17       ` 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=20200811133407.GA88171@www.stare.cz \
    --to=sox-devel@lists.sourceforge.net \
    /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).