rem: static void FillReadBuffer(struct AHIRequest *ioreq, struct AHIDevUnit *iounit, struct AHIBase *AHIBase)
add: FillReadBuffer ( struct AHIRequest *ioreq, struct AHIDevUnit *iounit, struct AHIBase *AHIBase )
context: static void FillReadBuffer(struct AHIRequest *ioreq, struct AHIDevUnit *iounit,    struct AHIBase *AHIBase){  ULONG length,length2;  APTR  oldaddress;  BOOL  remove;#ifdef DEBUG_R  KPrintF("FillReadBuffer\n");#endif  if(iounit->ValidRecord) // Make sure we have a valid source buffer  {    oldaddress = ioreq->ahir_Std.io_Data;    length = (ioreq->ahir_Std.io_Length - ioreq->ahir_Std.io_Actual)             / AHI_SampleFrameSize(ioreq->ahir_Type);    length2 = (iounit->RecordSize - ioreq->ahir_Std.io_Offset)              / AHI_SampleFrameSize(AHIST_S16S);#ifdef DEBUG_R    KPrintF("Samples left in buffer: %ld\n", length2);#endif    length2 = MultFixed(length2, (Fixed) ioreq->ahir_Frequency);#ifdef DEBUG_R    KPrintF("Left to store: %ld  Left to read: %ld\n",length, length2);#endif    if(length <= length2)    {      remove=TRUE;    }    else    {      length = length2;      remove = FALSE;    }#ifdef DEBUG_R    KPrintF("Copying %ld bytes from 0x%08lx + 0x%08lx to 0x%08lx, add 0x%08lx\n",      length, iounit->RecordBuffer, ioreq->ahir_Std.io_Offset,      ioreq->ahir_Std.io_Data, ioreq->ahir_Frequency);#endif    switch (ioreq->ahir_Type)    {      case AHIST_M8S:        RecM8S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      case AHIST_S8S:        RecS8S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      case AHIST_M16S:        RecM16S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      case AHIST_S16S:        RecS16S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      case AHIST_M32S:        RecM32S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      case AHIST_S32S:        RecS32S(length,ioreq->ahir_Frequency,            iounit->RecordBuffer,            &ioreq->ahir_Std.io_Offset,            &ioreq->ahir_Std.io_Data);        break;      default:        ioreq->ahir_Std.io_Error = AHIE_BADSAMPLETYPE;        remove = TRUE;        break;    }        ioreq->ahir_Std.io_Actual += ((ULONG) ioreq->ahir_Std.io_Data - (ULONG) oldaddress);    if(remove)    {      Remove((struct Node *) ioreq);      TermIO(ioreq, AHIBase);#ifdef DEBUG_R      KPrintF("Finished.\n");#endif    }    else    {      ioreq->ahir_Std.io_Offset = 0;    }  }  else  {    ioreq->ahir_Std.io_Offset = 0;  }}