The addition of the OSS backend and the improved FreeBSD support of CAVA are finished.
Changes:
- add OSS support for FreeBSD
- OSS is the default input backend if compiled with OSS support
- sndio got some love: sndio is now also in the selection sequence for the default input backend. If compiled with sndio support it is the default input backend after OSS
- increased FreeBSD support in general
- applied previous port patches, simplifies FreeBSD port
- especially the VT font creation can be stripped from the port, font creation is now done by CAVA build
- extended documentation in the example config file and the README.md
A note regarding the "disable noncurses" patch: this patch disabled the noncurses output backend completely because it would garbage the screen (
vt(4)). In my tests I haven't encountered this behaviour, therefore I purged this patch and did not apply it.
Currently I have build and tested it only on 13.2-RELEASE with quartely (2023Q4) packages. I build and test on 14.0-RELEASE after the changes get upstreamed to
cava. Then is also the time to update the FreeBSD port. If someone wants to build and test the updated CAVA until the port is updated, one can follow these instructions:
Download the
git-diff(1) file
cava.diff from
https://upload.disroot.org/r/KPF8_afo#6wlL13Mo/9U66Wa0Oj2uwZlLRL/aIhx0KAWizNR3yAc=. The file is downloadable for the next 30 days. Put it somewhere inside your build environment, e.g.
~/cava.diff. Then install the build-dependencies:
Code:
# Required
pkg install autotools fftw3 git iniparser pkgconf
# Optional
pkg install autoconf-archive psftools sdl2 sndio
x11-fonts/psftools is needed for the VT font creation,
devel/sdl20 is needed for the SDL output backend (you want it),
devel/autoconf-archive is needed for the SDL GLSL shader output backend (hell yeah you want it!) and
audio/sndio is needed for the sndio input backend (sndio deserves more love too!). Then fetch the latest CAVA source and build it:
Code:
git clone --depth=1 https://github.com/karlstav/cava
cd cava
git apply ~/cava.diff
./autogen.sh
mkdir build
cd build
CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ../configure --prefix=/opt/cava --disable-input-alsa --disable-input-pipewire --disable-input-pulse --disable-input-portaudio
make
make install
Before running
/opt/cava/bin/cava you can copy the updated config file:
cp example_files/config ~/.config/cava/config
CAVA doesn't support commandline options or environment variables to change its parameters, but it supports loading a custom config file instead of the standard
~/.config/cava/config with the
-p
switch. In this way you can have different configurations and appearances for different situations. I have prepared three configs, dependend on which output backend I want:
Code:
$ cat ~/.config/cava/config.ncurses
[output]
alacritty_sync = 1
[smoothing]
monstercat = 1
noise_reduction = 65
Code:
$ cat ~/.config/cava/config.sdl
[general]
framerate = 100
[output]
method = sdl
channels = mono
[color]
background = '#222222'
foreground = '#ffaa00'
[smoothing]
monstercat = 1
noise_reduction = 65
Code:
$ cat ~/.config/cava/config.sdl_glsl
[general]
framerate = 100
[output]
method = sdl_glsl
channels = mono
fragment_shader = northern_lights.frag
[color]
background = '#111111'
foreground = '#00aa55'
[smoothing]
monstercat = 1
noise_reduction = 65
Left: sdl
Top right: sdl_glsl
Bottom right: ncurses
Now I need to get in contact with upstream.