sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Jan Stary <hans@stare.cz>
Cc: sox-devel@lists.sourceforge.net
Subject: Re: [PATCH] oss: remove check for machine/soundcard.h and libossaudio
Date: Tue, 11 Aug 2020 16:17:12 +0100	[thread overview]
Message-ID: <yw1x4kp9us93.fsf@mansr.com> (raw)
In-Reply-To: <20200811144002.GC63033@www.stare.cz> (Jan Stary's message of "Tue, 11 Aug 2020 16:40:03 +0200")

Jan Stary <hans@stare.cz> writes:

> On Aug 11 14:58:20, mans@mansr.com wrote:
>> > 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?)
>> 
>> That's what it looks like.  Does OpenBSD have an audioio.h file for some
>> other purpose?
>
> There is <sys/audioio.h>, see http://man.openbsd.org/audio
> Apparently, this is the uniform audio HW abstraction
> implemented by the individual audio card drivers:
>
> ./dev/pci/auacer.c:#include <sys/audioio.h>
> ./dev/pci/auglx.c:#include <sys/audioio.h>
> ./dev/pci/auich.c:#include <sys/audioio.h>
> ./dev/pci/auixp.c:#include <sys/audioio.h>
> ./dev/pci/autri.c:#include <sys/audioio.h>
> ./dev/pci/auvia.c:#include <sys/audioio.h>
> [...]

OK, so we definitely need a more specific test here.  It also seems[1]
like in Solaris 8 that file was to sys/audio.h where it remains[2].

[1] https://docs.oracle.com/cd/E19455-01/816-3330/6m9kamh4f/index.html
[2] https://docs.oracle.com/cd/E88353_01/html/E37851/audio-4i.html

>> > 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?
>> 
>> Probably to compile-test the related source files on other systems.
>
> I don't understand: what compile-test?
>
> Why do we have e.g. src/bit-rot/sndio.h?
> If we are on a sndio system (such as OpenBSD),
> there will be a sndio.h we can use;
> on other systems, how would we use src/bit-rot/sndio.h?

There's a commented-out line in the Makefile that adds -Ibit-rot to the
compiler flags.  I'm guessing someone used (or intended to use) this to
compile e.g. sndio.c.  It would obviously still fail to link.  The
purpose of this would (presumably) be to make sure those files are kept
up to date if changes are made to the libsox internal interface.

-- 
Måns Rullgård


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

      reply	other threads:[~2020-08-11 15:17 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
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 [this message]

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=yw1x4kp9us93.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).