Of course Csound has such code. The wave stuff is in wave.c and AIFF in aiff.c Latest version even has a little AIFC