@benny! & Shockwave: thanks you guys! It was not really "hard work" as the original code did not have issues with compilation or anything. It was just done by somebody who seems to be a student in computer science and done for what seemed to be a school's end-of-the-year project. I mean by that that the code was not very structured and organized. I just "cleaned the house" a bit.
Note to developers: if you want to reuse the replay routine only (C/C++) version, just steal the sid_emu.c and sid_emu.h files from the archive. The WaveOut sound server was provided as an example. The core routines just render the samples into a provided buffer. Then you can redirect the buffer to whatever you want: WaveOut, DirectSound, etc.
Since now the emulator's state is contained in a structure, it is multi-thread safe and you can have several SID emulators running in parallel. That can be usefull for cross-fading between songs, etc.
It is also a good practice to keep the replay routine separated from the audio output mechanism. The example I provided could work well for a simple production (intro/demo) but I would not use it "as is" for something more complex, like a player (e.g. WinAmp, etc).