From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 0630A212FFBB for <9fans@9fans.net>; Sat, 11 Apr 2020 23:20:28 -0400 (EDT) (envelope-from clueelf@tonymendoza.us) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 19F399FD809; Sat, 11 Apr 2020 23:20:28 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1586661627; b=yLjGpzFb3YRoYuCUiZB+XgLKEQrREzljejehuDBJEuaArXfmpc yjIVTEjKTN+giqkRhTPxiuS88XfHLF0xU/Cg7rU7xTt4XHrVPXqXe2auZ/4/sgXD G8/FsbKJgg89kiWBpW5+vRJk9poYSwnpgJsqcCQYkyUsxK3OH+vN78BEZqwo8LTT wZovcSKhlO7MsBmSHnR/IuYXb4FCexIFBpKEvkTrJDRXIM3MBUSQEwwO3Ny7Upv1 LyGUX0zt3TIsQhsZQsBpXGIOTL5oIQuTV+nZ2R6djTFik0jdacq9YIhfoR+oChRC dlPr/cVIXYB3zIx02oRweUXPrpgPqOuPpYcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:date:to:subject:from:in-reply-to :content-transfer-encoding:content-type:message-id; s=arcseal; t=1586661627; bh=fOZGwCwb7fb9C9ncv88f8gkIxTCxCnUVBvVzWcTJP7M=; b= i/uOrqNXjSDzfY7OisCwRaQ0JxhboRbWoLYlN//LnyLTCsNQYQT4OO1raUpPxF+E 6tqHz9w1vMLi33P8tVtp+yg48iwACkKpNiNEoyNLlPKsXKuqFTBKiDMv1izJTuaR pJeLiJqZtTptt/yo/w4rh4Nk0ZX7UwnqjmrfUjQJq/tU1WmjhO2ORsMOWBxwQsvc 05fzwsNgE8SPGNSxnIZaxtA7sH61LkytvdwWfjXIzWT6ZCA2mSuLykvNLsF0fy2+ LpMyxxas9qiHPkl2QjKWriGC7GedPxWGHtX5jKCcmvNFV/ZTLTlLG2fsvCQLMRJ9 S0OXEdxbcok6xbyn5orjPg== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=tonymendoza.us; iprev=pass smtp.remote-ip=65.39.178.142 (smtp5.hushmail.com); spf=none smtp.mailfrom=clueelf@tonymendoza.us smtp.helo=smtp5.hushmail.com; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=smtp5.hushmail.com policy.ptr=smtp5.hushmail.com; x-return-mx=pass header.domain=tonymendoza.us policy.is_org=yes (MX Records found: plsmtp1.hushmail.com,plsmtp2.hushmail.com); x-return-mx=pass smtp.domain=tonymendoza.us policy.is_org=yes (MX Records found: plsmtp1.hushmail.com,plsmtp2.hushmail.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC none); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=tonymendoza.us; iprev=pass smtp.remote-ip=65.39.178.142 (smtp5.hushmail.com); spf=none smtp.mailfrom=clueelf@tonymendoza.us smtp.helo=smtp5.hushmail.com; x-aligned-from=pass (Address match); x-ptr=pass smtp.helo=smtp5.hushmail.com policy.ptr=smtp5.hushmail.com; x-return-mx=pass header.domain=tonymendoza.us policy.is_org=yes (MX Records found: plsmtp1.hushmail.com,plsmtp2.hushmail.com); x-return-mx=pass smtp.domain=tonymendoza.us policy.is_org=yes (MX Records found: plsmtp1.hushmail.com,plsmtp2.hushmail.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgeduhedrvdehgdeijecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepggffvffuhf gjgfgtsehtjedttddttdejnecuhfhrohhmpegtlhhuvggvlhhfsehtohhnhihmvghnugho iigrrdhushenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhtohhpihgtsghogidrtg homhenucfkphepieehrdefledrudejkedrudegvddpieehrdefledrudejkedrkeefnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepieehrdefledrudejke drudegvddphhgvlhhopehsmhhtphehrdhhuhhshhhmrghilhdrtghomhdpmhgrihhlfhhr ohhmpeeotghluhgvvghlfhesthhonhihmhgvnhguohiirgdruhhsqecuuffkkgfgpeefge elge X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: none (tonymendoza.us: No applicable sender policy available) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="clueelf@tonymendoza.us"; helo=smtp5.hushmail.com; client-ip=65.39.178.142 Received: from smtp5.hushmail.com (smtp5.hushmail.com [65.39.178.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 11 Apr 2020 23:20:27 -0400 (EDT) (envelope-from clueelf@tonymendoza.us) Received: from smtp5.hushmail.com (localhost [127.0.0.1]) by smtp5.hushmail.com (Postfix) with SMTP id C5C1B2020C for <9fans@9fans.net>; Sun, 12 Apr 2020 03:20:26 +0000 (UTC) X-hush-tls-connected: 1 Received: from smtp.hushmail.com (w1.hushmail.com [65.39.178.83]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp5.hushmail.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sun, 12 Apr 2020 03:20:26 +0000 (UTC) Received: by smtp.hushmail.com (Postfix, from userid 99) id 614ACC0152; Sun, 12 Apr 2020 03:20:26 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 11 Apr 2020 22:20:26 -0500 To: "9fans" <9fans@9fans.net> Subject: Re: [9fans] macOS drawterm audio From: clueelf@tonymendoza.us In-Reply-To: <20200331193229.BB74EC0214@smtp.hushmail.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="UTF-8" Message-Id: <20200412032026.614ACC0152@smtp.hushmail.com> Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 911cea06-7c6c-11ea-8411-89c6205588e9 So I got this working. My work is in a forked repo on github. I created a new branch named macos-audio https://github.com/tmendoza/drawterm-macos-audio/tree/macos-audio As of right now, it builds on my machine just fine: macOS Mojave Version 10.14.6 (base) apollo:drawterm-macos-audio tmendoza$ clang -v Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin18.7.0 Darwin apollo.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Aug 20 16:57:14 PDT 2019; root:xnu-4903.271.2~2/RELEASE_X86_64 x86_64 Audio playback is done using PortAudio. Sorry, but I didn't have the desire to dig thru Apple's AUHAL API's. Nope. To build properly, you can use Homebrew to install portaudio. I am using VSCode for an IDE and it appears to have picked up libs and header dirs. Make.osx-cocoa was an easy update. Note, I am by no means an expert Apple Developer, but it seems to be working pretty well. Been playing WAV files all weekend. I have also added volume control thru /dev/volume. Any 'audio source' commands written to /dev/volume will modify the master volume on the OS. Apple doesn't seem to have an API for per-application volume control, so whatever you write to /dev/volume (1-100) changes the entire system volume for the machine. Also, any changes made to the volume controls using standard OS tools or volume buttons on your laptop will be reflected when reading /dev/volume. If anyone tries this out and has issues let me know and I will try and resolve. This was a weekend hack so your mileage may vary. I am thinking about creating an official build for macOS. If anyone is interested let me know and I can make it a priority. Tony On 3/31/2020 at 2:34 PM, clueelf@tonymendoza.us wrote: > >All, > >Wanted to reach out before I started doing any work on this, but >does anyone have existing code for a devaudio-macos.c for >drawterm? I see win32 and unix have working audio. > >If anyone has something out there they have started that I can >use, would be greatly appreciated. I am willing to take a stab >at it, but just wanted to check before I went down this rabbit >hole. If not... I think I can bang it out. Doesn't seem too >difficult. > >I need audio! > >Tony > > >------------------------------------------ >9fans: 9fans >Permalink: >https://9fans.topicbox.com/groups/9fans/Tfe03295f479d4dad- >M6ff0f0be4cf446bf5cd301fb >Delivery options: >https://9fans.topicbox.com/groups/9fans/subscription