add: data->totallength = common->numSampleFrames * common->numChannels *
context: LONG ReadCOMMchunk(struct HandlerData *data, UBYTE *buffer, LONG length) {  UWORD *src = (UWORD *) buffer;  LONG   len = (length >> 1) - 2;  ExtCommonChunk *common;  while(len > 0) {    if(((ULONG *) src)[0] == ID_COMM) {      common = (ExtCommonChunk *) (src + 4);      data->channels    = common->numChannels;      data->bits        = common->sampleSize;/*      data->totallength = common->numSampleFrames *          (data->bits <= 8 ? 1 : (data->bits <= 16 ? 2 : (data->bits <= 32 ? 4 : 0)));*/      data->freq = extended2long(&common->sampleRate);      if(!data->args.channels)        data->args.channels = &data->channels;      if(!data->args.bits)        data->args.bits     = &data->bits;/*      if(!data->args.length)        data->args.length   = &data->totallength;*/      if(!data->args.freq)        data->args.freq     = &data->freq;    }    else if(((ULONG *) src)[0] == ID_SSND) {      src += 8;      break;    }    src++;    len--;  }  return (LONG) src - (LONG) buffer;}