PulseAudio project for art installations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, the following open source code is available.

https://github.com/FlamingLotusGirls/Serenity/tree/master/sound/

Note that there are four components of note:

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,

SoundAdmin, which holds state between reboots and give interactive elements a single server to interface with ( nodejs ),

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,

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.

As noted in my other mails on the project, the three issues with PulseAudio that slowed me down  were:

* 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,

* Running an app like this as a service which needs to auto-restart,

* 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.

This project did not require tight time synchronization between speakers, although we may evolve to that in newer sculptures.

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.

It was recommended to me this project would have been better with GStreamer.

Share and enjoy.

-brian

On 9/2/2019 12:26 PM, Arun Raghavan wrote:
On Tue, 3 Sep 2019, at 12:13 AM, Brian Bulkowski wrote:
Thanks for the response, if you don't believe this is a good use, I 
won't bother further. GStreamer, then.
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
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux