The original data available from the MIT website is stored in individual ".wav" files, at 44100Hz sample rate. For creation of this library, resampled version were made. At this point there were 2944 files, so a Python script was then written to iterate through all the files, sorting them and creating multi-dimensional C arrays out of them. Next, the mechanism for returning the appropriate array elements was written and tested.
int nAzimuth = 30;
int nElevation = 0;
int nTaps = 0;
short* pLeft = 0;
short* pRight = 0;
nTaps = mit_hrtf_availability(nAzimuth, nElevation, 44100, 0);
if(nTaps)
{
pLeft = malloc(nTaps * sizeof(short));
pRight = malloc(nTaps * sizeof(short));
nTaps = mit_hrtf_get(&nAzimuth, &nElevation, 44100, 0, pLeft, pRight);
}
if(pLeft)
free(pLeft);
if(pRight)
free(pRight);