assert (out);
ADM_assert (out);
A_saveAudio (char *name){// debug audio seek  uint32_t len2;  uint32_t written, max;  DIA_working *work;  FILE *out;#define BITT 500  uint8_t buffer[BITT];  if (!currentaudiostream)    return;  if (!currentaudiostream->isCompressed ())    {      GUI_Alert	("The audio is wav PCM. \nPlease select Audio Process mode \notherwise the audio stream will be\n unreadable (raw PCM))");      return;    }  work=new DIA_working("Saving audio");  out = fopen (name, "wb");  assert (out);// compute start position  currentaudiostream->goToTime (video_body->getTime (frameStart));// compute max bytes to write (with little margin)  max =    currentaudiostream->convTime2Offset (video_body->					 getTime (frameEnd + 1)) -    currentaudiostream->convTime2Offset (video_body->getTime (frameStart));  written = 0;  while (1)    {      len2 = currentaudiostream->read (BITT, (uint8_t *) buffer);      fwrite (buffer, len2, 1, out);      if (len2 != BITT)	break;      written += len2;      if (written > max)	break;			// we wrote everything !      work->update(written, max);      if(!work->isAlive()) break;    };  fclose (out);  delete work;  printf ("\n wanted %u bytes, written %u\n", max, written);}