bazald/zenilib — pull request #1 by dadrian (2013-10-09 19:48:55+00:00)
Title: Handle audio with > 2^31 samples

Vorbis file wants an int for the length to read since it never reads more than one Vorbis packet at a time. So if we read in 4096 byte chunks until the end, instead of always passing in the number of bytes casted to an int, we can load audio files that have more than 2^31 bytes uncompressed, which roughly corresponds to a 200 minute long stereo song.

2^31 bytes * (1 sample / (2 bytes * 2 channels) ) * (1 sec / 44100 samples) * (1 min / 60 sec) ~ 200 minutes of stereo audio.

You know, just in case.