The easiest way to play some audio samples using AHI is this:
BPTR file;
UWORD *buffer;
LONG buffersize;
file = Open("AUDIO:b/16/c/2/f/44100",MODE_NEWFILE);
Write (file,buffer,buffersize);
Close (file);
It assumes that the buffer is filled with 16 bit stereo samples at 44.1 kHz.
Bye,
Thomas