You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calculating the duration with the wavDuration() method, the size used is Parser.Size. In Parser.Parse() this is set to be the RIFF chunkSize, i.e. the file size - 8 bytes. This means that the header chunks are included in the calculation, giving a duration that is too long. The size that should be used is the size from the data chunk.
In most cases the added duration will be small enough that you won't notice, but if you need to know the exact number of samples in the file, or you have a file with large amounts of meta data in the headers (which you could typically get with BWF and derivatives), it becomes a problem.
The text was updated successfully, but these errors were encountered:
When calculating the duration with the wavDuration() method, the size used is
Parser.Size
. InParser.Parse()
this is set to be theRIFF
chunkSize, i.e. the file size - 8 bytes. This means that the header chunks are included in the calculation, giving a duration that is too long. The size that should be used is the size from thedata
chunk.In most cases the added duration will be small enough that you won't notice, but if you need to know the exact number of samples in the file, or you have a file with large amounts of meta data in the headers (which you could typically get with BWF and derivatives), it becomes a problem.
The text was updated successfully, but these errors were encountered: