From owner-freebsd-ports@freebsd.org Fri Dec 15 07:49:28 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E08BE9E6F3 for ; Fri, 15 Dec 2017 07:49:28 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: from mail-it0-x22e.google.com (mail-it0-x22e.google.com [IPv6:2607:f8b0:4001:c0b::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 047C66BC98 for ; Fri, 15 Dec 2017 07:49:28 +0000 (UTC) (envelope-from gurenchan@gmail.com) Received: by mail-it0-x22e.google.com with SMTP id f190so16937593ita.5 for ; Thu, 14 Dec 2017 23:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e1UDlGs21PFD9ZKB/92Z8rKtv+L5Th+gpAtgJQFZX3Y=; b=QFcYPQZWFiaITHTZXynvQ5UaTuINmVUpZfxdnclE2np3TrI2IEfmRmMm2WpxontmBP 4v2piaSJsNaJNp9qtLw81WqzMpt7TgF9nvBjnEWvFMUwifT03tfaW57t2tq5+R0y9+Db cUxTwcsJb0TFZRi7DqPZTu3MhaeFie259MxWfm2tEagbYFaEm58cVha9agfRPBKqlmFN 0FjZPivUgm4wlaASOhL/4SgO/VXYtknNueVZ9ubOqVT2VEUZsRS/DnII1RUyN0osnp5C A9IbDWaODAcnrW8+7xN9SoRW7D8jhSXEUWYmUibx1aU6eMlMIHuBicqtoVUHqvEgbKbG /HAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e1UDlGs21PFD9ZKB/92Z8rKtv+L5Th+gpAtgJQFZX3Y=; b=SWGQM2TqcKlLxWImbF1+ihX19f7MOahKtlMsrFiZ9v0GwTWHkpMra+kTKIPyeQV+bX MUJyiaBDx8dGybZkyZqlLCe85E0mLBn8xe413HwvttuWvBAC7nx44UZNke3br9lZtVQs ROBm2I+fjb3dQifIOnqZ1UAX8NfKgycolQ7QjHpP8OXFzP+BqGeubQKKaQSul9LxVWsZ V9wtIpZ2Nq+kjI+osBRdeoPUB/faiwfCNTTDRRsyVz5QGoZNr65NGJB/n6t6E1tfqzQO NAFhTSzdYJ7WnzDilZbFg4knKkcc0sGx8pygAHlndzxKlzken1Y7KPwgfqbiffKpNKKq 5ZHA== X-Gm-Message-State: AKGB3mI7ZRMoav+RszC49OkcN6E9WNIoPr6rkTui4sY+h040kJHSV8Jj 5mM2XhRFvTYuU0vwMguHylWhZQCngRqqJWmOh8nbag== X-Google-Smtp-Source: ACJfBosCni9FR8P5aNckvVaLEaQR7gz6RbyigmwdUnaoFUCeAmh4dTZbPaY5ffAws0KUqmyad3+rVg/6g+roR+2iXiw= X-Received: by 10.107.162.131 with SMTP id l125mr12076470ioe.153.1513324167220; Thu, 14 Dec 2017 23:49:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.11.31 with HTTP; Thu, 14 Dec 2017 23:49:26 -0800 (PST) In-Reply-To: References: From: blubee blubeeme Date: Fri, 15 Dec 2017 15:49:26 +0800 Message-ID: Subject: Re: Re: OSS Audio To: Sid Cc: FreeBSD Ports Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 07:49:28 -0000 On Fri, Dec 15, 2017 at 9:26 AM, Sid wrote: > > blubee blubeeme - Tue Dec 5 00:48:05 UTC 2017 > > > If I can provide OSS audio/midi input and output for the tools that I > use, > > then I can do all the routing natively with OSS. > > A problem with this is FreeBSD's backend sound architecture allows one > device input or output at a time. > cat /dev/sndstat shows this, which I believe is OSS. There is sndio's > backend sndiod (from OpenBSD) that can alternatively be enabled, but I hear > the volume on it is too low, and I'm not sure if it allows multiple > devices. sndiod's backend can be enabled by service sndiod start: it is in > /usr/local/etc/rc.d/. > There's nothing in FreeBSD that makes the sound architecture only support 1 audio device. These were issues with earlier versions of OSS implementation; please remember the days of rebooting your system to get new devices to show up. All those issues have been sorted out in OSS 4.0 and above. OSS API is like working with file descriptors; The open() system call The close() system call The read() system call The write() system call The ioctl() system call The select() and poll() system calls The mmap() system call What's complicated about that? Jack audio is NOT necessary, I already ported amsynth over to FreeBSD, they had a very old implementation of OSS backend for midi that just worked with my midi keyboard. I spoke to the developer and he also updated his code to the newest version of OSS, here's some code: https://github.com/amsynth/amsynth/commit/7171bd4d945c5938442b80f4276b7e096f06a3a0#diff-0b31b8315cadf5e7556f54a245817f90 There's a lot of misinfo out there about OSS being depreciated or dead, that's not the case. >From looking at what's available OSS is one of the most straight forward and stable Audio API's out there. If you want to test for yourself, install audio/oss then run osstest and report back. There's ALSA plugins for OSS that would provide better audio vs the way things are implemented right now.