rem: AHI_ControlAudio(iounit->AudioCtrl, AHIC_Record,FALSE, TAG_DONE); iounit->IsRecording = FALSE;
add: if(--iounit->RecordOffDelay == 0) { AHI_ControlAudio(iounit->AudioCtrl, AHIC_Record,FALSE, TAG_DONE); iounit->IsRecording = FALSE; }
context: void FeedReaders(struct AHIDevUnit *iounit,struct AHIBase *AHIBase){  struct AHIRequest *ioreq;  ObtainSemaphore(&iounit->ListLock);  for(ioreq = (struct AHIRequest *)iounit->ReadList.mlh_Head;      ioreq->ahir_Std.io_Message.mn_Node.ln_Succ;      ioreq = (struct AHIRequest *)ioreq->ahir_Std.io_Message.mn_Node.ln_Succ)  {    FillReadBuffer(ioreq, iounit, AHIBase);  }  // Check if Reader-list is empty. If so, stop recording.  if( ! iounit->ReadList.mlh_Head->mln_Succ )  {    AHI_ControlAudio(iounit->AudioCtrl,        AHIC_Record,FALSE,        TAG_DONE);    iounit->IsRecording = FALSE;  }  ReleaseSemaphore(&iounit->ListLock);}