Interesting exercise, but for those looking for something closer finished product: look no further than openal-soft. Its HRTF support is what makes sound effects in Minecraft (Java Edition, on Windows and Linux -- headphone detection was very recently added for macOS) truly sound where they're coming from. Plus there's no intermediate mixing through any surround system, so you can even tell up from down. (HRTF in alsoft is not quite complete: it lacks support for near-field effects.)
Oh, (2014). That was a different time -- alsoft had just added HRTF and the technique was less known by then.