rem: static void ReadCmd(struct AHIRequest *ioreq, struct AHIBase *AHIBase)
add: ReadCmd ( struct AHIRequest *ioreq, struct AHIBase *AHIBase )
context: static void ReadCmd(struct AHIRequest *ioreq, struct AHIBase *AHIBase){  struct AHIDevUnit *iounit;  ULONG error,mixfreq = 0;  if(AHIBase->ahib_DebugLevel >= AHI_DEBUG_HIGH)  {    KPrintF("CMD_READ\n");  }  iounit = (struct AHIDevUnit *) ioreq->ahir_Std.io_Unit;  /* Start recording if neccessary */  if( ! iounit->IsRecording)  {    if( (! iounit->FullDuplex) && iounit->IsPlaying)    {      error = AHIE_HALFDUPLEX;   // FIXIT!    }    else    {      error = AHI_ControlAudio(iounit->AudioCtrl,         AHIC_Record,TRUE,         TAG_DONE);    }    if( ! error)    {      iounit->IsRecording = TRUE;    }  }  if(iounit->IsRecording)  {    AHI_ControlAudio(iounit->AudioCtrl,        AHIC_MixFreq_Query,&mixfreq,        TAG_DONE);    ioreq->ahir_Std.io_Actual = 0;    /* Initialize ahir_Frequency for the assembler record routines */    if(ioreq->ahir_Frequency && mixfreq)      ioreq->ahir_Frequency = ((mixfreq << 15) / ioreq->ahir_Frequency) << 1;    else      ioreq->ahir_Frequency = 0x00010000;       // Fixed 1.0    ObtainSemaphore(&iounit->ListLock);    /* Add the request to the list of readers */    AddTail((struct List *) &iounit->ReadList,(struct Node *) ioreq);    /* Copy the current buffer contents */#ifdef DEBUG_R    KPrintF("Copy old!\n");#endif    FillReadBuffer(ioreq, iounit, AHIBase);    ReleaseSemaphore(&iounit->ListLock);  }  else  {    ioreq->ahir_Std.io_Error = error;    TermIO(ioreq, AHIBase);  }}