rem: length2 = (iounit->RecordSize - ioreq->ahir_Std.io_Offset) >> 2; length2 = MultFixed(length2, (Fixed) ioreq->ahir_Frequency);
context: static void FillReadBuffer(struct AHIRequest *ioreq, struct AHIDevUnit *iounit,    struct AHIBase *AHIBase){  ULONG length,length2;  APTR  oldaddress;  BOOL  remove;  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;    switch (ioreq->ahir_Type)    {      case AHIST_M8S:        break;      case AHIST_S8S:        length >>= 1;        break;      case AHIST_M16S:        length >>= 1;        break;      case AHIST_S16S:        length >>= 2;        break;      case AHIST_M32S:        length >>= 2;        break;      case AHIST_S32S:        length >>= 3;        break;    }    length2 = (iounit->RecordSize - ioreq->ahir_Std.io_Offset) >> 2;    length2 = MultFixed(length2, (Fixed) ioreq->ahir_Frequency);    if(length <= length2)    {      remove=TRUE;    }    else    {      length = length2;      remove = FALSE;    }    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);    }    else    {      ioreq->ahir_Std.io_Offset = 0;    }  }  else  {    ioreq->ahir_Std.io_Offset = 0;  }}