From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id EC5401F66E for ; Tue, 11 Aug 2020 15:12:13 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1k5Vwf-0003cX-0L; Tue, 11 Aug 2020 15:12:09 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5Vwd-0003cQ-Lu for sox-devel@lists.sourceforge.net; Tue, 11 Aug 2020 15:12:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:MIME-Version:Message-ID:Subject:To: From:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ieZVpQrESHyf5FKwATIImNJppLQBceD3/PNamfcz8pM=; b=XqmtCjh1Wm1BHcA789GdVU7EGd kOY4EM/3K00oCsIn5PIyd/fTnFYeYMGfYiEOuqwcpQfnFiVCr953wQVB6vA2sR+O1Koe3cNx2XU6S 58LUcew+iYkqVgbvjVI2N3HAIDZVIUVm5Qhj/uR/paRX9ESZbQfD9GCuLd/ubTtwvejA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date:Sender:Reply-To :Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=ieZVpQrESHyf5FKwATIImNJppLQBceD3/PNamfcz8pM=; b=Z abvefRbbSJV9I89jaVKLJieepBYuZ4gC154KnYxw0gx0eeBMZFZxIX+RcPfE6MmW6ynCMFKW0u43z /Bx2dDkHndZfti8zjUSw6ZF7U11S0sM7+o7qwevuDkLhcpJvbP8OcuTuu2sDq/evPeFf7oZFPutXI YJnMdphKzwo8c+Kk=; Received: from uvt.stare.cz ([185.63.96.79] helo=mx.stare.cz) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1k5Vwb-008zuE-4H for sox-devel@lists.sourceforge.net; Tue, 11 Aug 2020 15:12:07 +0000 Received: from localhost (stare.cz [local]) by stare.cz (OpenSMTPD) with ESMTPA id 9de97771 for ; Tue, 11 Aug 2020 17:11:50 +0200 (CEST) Date: Tue, 11 Aug 2020 17:11:49 +0200 From: Jan Stary To: sox-devel@lists.sourceforge.net Message-ID: <20200811151149.GA87966@www.stare.cz> MIME-Version: 1.0 Content-Disposition: inline X-Headers-End: 1k5Vwb-008zuE-4H Subject: sunaudio detection and libossaudio X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sox-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: sox-devel-bounces@lists.sourceforge.net [Isolating this from a related oss detection thread] On Aug 11 15:34:07, hans@stare.cz wrote: > 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 nor ; > it has , 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) Currently, the configure system uses the following to decide whether the underlying system provides the 'sunaudio' driver: AC_OPTIONAL_FORMAT(sunaudio, SUN_AUDIO, [AC_CHECK_HEADERS(sys/audioio.h,, [AC_CHECK_HEADERS(sun/audioio.h,, using_sunaudio=no)])]) that is wrong on at least OpenBSD, which does have sys/audioio.h, but it does not provide a sunaudio device driver. The audioio.h interface is the audio HW abstraction that the individual card drivers implement, see http://man.openbsd.org/audio The result is that ./configure mis-detects sunaudio and tries to compile the driver, which fails as described above. It seems that a more correct way of detecting the sunaudio driver would be to check if AUDIO_GETINFO and AUDIO_SETINFO are defined and the audio_info_t type is declared. Jan _______________________________________________ SoX-devel mailing list SoX-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sox-devel