title: Converting Bytes read to seconds read
body: <p>I am reading data from a Riff wav fmt file, I have an array of the data chunk <code>DataBuffer</code> of the wav file, how can I convert the number of bytes read of the data to the number of seconds read from the wav file.</p>
  <pre><code>int size_buffer = (Subchunk2Size / (NumOfChan * bitsPerSample / 8));
  FILE* WavResult = fopen(FileNom, &quot;rb&quot;);
  u8* DataBuffer = new u8[size_buffer];
  size_t nRead = fread(DataBuffer, sizeof DataBuffer[0], size_buffer, WavResult);
  </code></pre>