Canberra

Sid sid at bsdmail.com
Fri Dec 22 12:52:18 UTC 2017


> Blubee Blubeeme;
> Who thought that was a good idea, now layer a few more audio layers and u have Linux[ism] to the max.
> Well, I think that it's not really worth it to go untangle that mess.
> It's okay if you're using a Gnome DE since it's all in there already but just to play
a sound file you have to bring in all of this nonsense.
> If you want to keep going down the Gnome hole, go ahead let me know when you get
to the OSS specific issues, if any.
> There's a lot more pressing issues that affect a larger surface area than a DE.
> Best

You're right, it's a rabbit hole. Whenever something starts to get untangled, it changes and becomes more tangled again.

I made a personal Makefile for a light install of libcanberra that doesn't use gtk at all. It worked, but more ports now require gtk3 for graphics for some reason. libcanberra-gtk libraries and its package are now called specifically from the sourcecode.

An elegant short term solution is to set make.conf to not install pulseaudio and gstreamer1 for audio/libcanberra-gtk3:  audio_libcanberra-gtk3_UNSET=PULSEAUDIO GSTREAMER. This accomplishes the same outcome, without the extra Makefile, and tedious extra work.

This made me wonder, that I can create a Makefile for distfile/sourcecode of gstreamer1 and audio/pulseaudio to extract the most used libraries, to avoid more compilation of those dependencies. The full port and the partial port may not necessarily conflict, because the extracted library should be similar enough to the one in the full install, but if it does, then CONFLICTS= only allows 1 of those ports. I can then file a bug report of this, if it works.


Back to a drop in replacement:

libcanberra uses audio/libvorbis which has its own API. libvorbis will do for .oga files. Wav files may need more work, or simply the .wav files will have to be filed as bugs to be converted into .oga files.

An important thing to know about libcanberra is, where the program calls it, and where it calls OSS and libvorbis. Calls to gstreamer1 and pulseaudio, perhaps via their library files, should go to the OSS API. Other than that, API's are another language to me.

Also, there has to be a way (perhaps like from make.conf) to make full substitutions of packages and libraries. As long as the program that calls it doesn't make drastic changes that affect it.

>> Sid;
>> Sooner or later, a drop in replacement for libcanberra needs to be made for all BSD's. It should use ogg files from audio/freedesktop-sound-theme.
>> Canberra is meant only for sound (.oga, .wav), but graphical code is tied in heavily into it for XDG icons and graphics standards, so the problem is not just around gtk.


More information about the freebsd-ports mailing list