Dear all,

I'm curious about the following. Sometimes several data are retrieved from a file using several read operations, such as in this code from function wavread:

wFormatTag  =  mget(1,  "us",  fid);   // Data encoding format
nChannels  =  mget(1,  "us",  fid);  // Number of channels
nSamplesPerSec  =  mget(1,  "ui",  fid);  // Samples per second
nAvgBytesPerSec  =  mget(1,  "ui",  fid);  // Avg transfer rate
nBlockAlign  =  mget(1,  "us",  fid);  // Block alignment

This could well have been done reading all data at once. It would be a bit more complicated to convert the data to the final form because of the heterogenuous size of the fields (some are two-byte and others four-byte).

Doesn't this approach impose more mechanical stress on the hard drive? Or even larger access time?

Or upon the first read a full sector is transferred to a buffer?

Thanks for any insight!

Regards,

Federico Miyara
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to