I was looking at the different sound systems currently in frotz, and it has three of them. Two for curses (libao and plain OSS) and one for sfrotz (based on SDL_mixer.) I was thinking about replacing all three with just one that is used for both frotz and sfrotz, and uses SDL (in audio-only mode in the case of curses frotz and possibly dfrotz.) This would also get rid of SDL_mixer, which is rather limited and can’t play multiple audio streams at the same time. OSS support would be handled automatically by SDL.
I wrote some audio code for my own projects, which I extracted into a small library a couple years ago and I would just import that into frotz. It’s a rather thin layer on top of the underlying decoding libraries (like libvorbisfile) and automates mixing and resampling. It can play audio streams directly from within other files (no need to extract “chunks” from blorb files and such) using SDL’s RWops. Basically you just point it to something and call play():
(A “hello world” example is at the bottom of that page.)
However, it’s a C++14 library, and since you mentioned you intend to support very old systems, I now am not sure if this is actually something that can be added to frotz.
If you think it can be added nonetheless (as a replacement for sfrotz’s audio system only, and as an option for curses frotz and dfrotz) it’s certainly possible to keep using a handwritten Makefile. It’s just that it’s difficult to work with. Not that CMake is a prime example of good design, mind you It’s more like something people have to use rather that something they want to use.
That would mean two separate build systems have to be maintained. That’s not something I would recommend.