Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Duration and samples throw error on WAVE file with no sub-chunks #13
I noticed when using WaveInfo on WAVE valid wave files with no data (or sub-chunks) that calling duration or samples would throw the following error:
I've created two tests to catch this error, and submitted a possible fix for the problem. Instead of throwing an error, my proposed changes will return zero instead. Also, I added a few checks to prevent divide by zero.