Now this is hilarious. I've been reverse engineering the audio engine for a while, recreating the classes, methods, members and all that. Then I decided to take a look at the RTTI - specific information C++ compilers put in the executable files they produce, which contains the names of the classes, virtual tables for classes containing virtual functions (including virtual destructors), information about class hierarchy - which class inherits from which, and so on.
Among the class names found in the RTTI there were two in particular that caught my eye - one called CDXMidi and CDXSound. Upon closer inspection, as I suspected, they turned out to be the classes I've been recreating, the classes Grimoire depends on for playing music and sound effects. Now thanks to the RTTI I knew their original names, so I've typed them into google search bar and, to my surprise, found out that these classes belong to an old game development kit called CDX. Quoting the documentation, CDX "is a free GDK (Game Development Kit) which is comprised of a set of C++ wrapper classes for writing Windows games. It is built on top of Microsoft Windows and DirectX technology and offers simple to use C++ wrappers for all aspects of game development".
I've compared the CDX source code with the result of my reverse engineering - there can be no doubt, this is your mysterious audio library,
DoomIhlVaria. The code is almost identical. I say "almost" because some code is slightly modified - probably by Cleve, to suit his specific needs. For example, CDX's CDXMidi::LoadMidi loads MIDI file from disk, so one has to supply it with a file name. The modified version used in the game hovewer takes a pointer to the block containing MIDI data in memory and the length of the data as another argument.
You can
download CDX and read its source code if you're interested. Look for the following files:
cdxmidi.h
cdxmidi.cpp
cdxsound.h
cdxsound.cpp
cdxsoundbuffer.cpp