Is there interest in a C++ wrapper to mad's API ?
and for a simplistic one ? ;-)
I'm asking, because I somehow ended up writing a simple C++ wrapper to MAD API. (a strictly C++ one. only ISO C++ headers used, plus shared_ptr from Boost.org, which is a high quality collection of standard-conforming, portable libraries)
Atm it's providing access to the most important API features in some high-level way (plus lower level functions provided for finer control).
for instance :
std::ostream * destination; // a file, a custom stream, whatever.. using namespace MadSam;
MadSam_Engine sam_engine; sam_engine.open_mp3("toto.mp3");
bool ok=true; while(ok) { ok = sam_engine.get_synth(); sam_engine.cur_synth_to_16bit_flow( *destination);//16-bit raw output }
but it's far from polished (doesnt address all cases, the interface is not polished..).
I'm using it in a toy decoder/player I'm writing (playing float samples with the jackit client API) ; and if this wrapper can be useful for MAD (eg as a sample for C++ developpers planning to use MAD, or whatever) I would try to make it as clean and self-explaining as I can. (but I would not spend weeks trying to make it feature-complete, though)
BTW : the madlld example client would deserve a link somewhere on MAD's web pages. I think it's the best documentation material for newcomers at this moment, and I only found a reference to it after downloading the whole mail archive. (so I mostly used minimad.c to get into the API, and it wasnt as smooth as it would have been if I had known about madlld.c)