<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi, the following open source code is available.</p>
<p><a
href="https://github.com/FlamingLotusGirls/Serenity/tree/master/sound/SerenityAudio">https://github.com/FlamingLotusGirls/Serenity/tree/master/sound/</a></p>
<p>Note that there are four components of note:<br>
</p>
<p>SerenityAudio, which drives multiple speakers with raspberry pis
and presents a REST endpoint as well as fetching JSON objects for
current status in case of a restart,</p>
<p>SoundAdmin, which holds state between reboots and give
interactive elements a single server to interface with ( nodejs ),</p>
<p>SoundButtons, which is a short python script to have different
buttons which are Raspberry PI gpio pins, as an example of a
simple interaction with SoundAdmin, <br>
</p>
<p>and the Admin app, which allows changing the balance of different
"effects", volumes for individual speakers and zones of speakers,
and such. Also written in Node, I think with vue.js. The admin app
also controls fire and leds, because we had all elements in the
sculpture.<br>
</p>
<p>As noted in my other mails on the project, the three issues with
PulseAudio that slowed me down were:</p>
<p>* My confusion about the "id" system in pulse audio, which has
different IDs for different things and if you're incautious you
will present the wrong ID to the wrong API,</p>
<p>* Running an app like this as a service which needs to
auto-restart,</p>
<p>* The proper way to think about the async interface - basically
when the 'user' data field of different APIs can be counted on to
be accessed for the last time. Example code is almost exclusively
single-file and terminates with the process, this example of
multiple loops and multiple speakers means you have to do your
async "the right way". In this case I coded to C11's new atomic
libraries.</p>
<p>This project did not require tight time synchronization between
speakers, although we may evolve to that in newer sculptures.<br>
</p>
<p>Otherwise, PulseAudio performed well, the extraordinarily low CPU
use meant I never worried about that, and by exposing the bus ids
of the USB ports I could accurately control which speaker was
which.</p>
<p>It was recommended to me this project would have been better with
GStreamer. <br>
</p>
<p>Share and enjoy.</p>
<p>-brian<br>
</p>
<div class="moz-cite-prefix">On 9/2/2019 12:26 PM, Arun Raghavan
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:6640a602-8cf8-4184-bbc8-d949d426a431@www.fastmail.com">
<pre class="moz-quote-pre" wrap="">On Tue, 3 Sep 2019, at 12:13 AM, Brian Bulkowski wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Thanks for the response, if you don't believe this is a good use, I
won't bother further. GStreamer, then.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
If you have something working with PulseAudio, it might make sense to keep it and maybe change incrementally rather than going back to the drawing board.
-- Arun
</pre>
</blockquote>
</body>
</html>