void WaveTrack::Read64K(sampleType * buffer, WaveBlock * b, sampleCount start, sampleCount len) { wxASSERT(b); wxASSERT(start >= 0); wxASSERT(start + len <= ((b->len + 65535) / 65536)); start *= 2; len *= 2; BlockFile *f = b->f; bool opened = f->OpenReadHeader(); wxASSERT(opened); f->SeekTo(headerTagLen + start * sizeof(sampleType)); int result = f->Read((void *) buffer, (int) (len * sizeof(sampleType))); wxASSERT(result == (int) (len * sizeof(sampleType))); f->Close(); }