Hi jahc
As already noted AHI is a system that is supposed to utilize the hardware for playing prepared sound.
I have to be honest, I've never done this, so I can be wrong. However I think that the best way to deal with variable input formats in very Amiga way is to use datatypes. The were supposed to do the job. And you could utilize any format if you only have apropriate datatype installed.
It would be nice if someone that used datatypes would verify this.
Good luck