Int and int64

Hi Jules !

I noticed that, to refer to a number of samples, in some parts of the code you use “int” and in some other parts you use “int64”.

For example :


Well I guess one won’t have a 16MB+ buffer very often but wouldn’t that be better to have consitency ? Or do you prefer it that way, to save memory space ?
I’m thinking about the case where one has a whole, long wave file, buffered in memory…

Nope, it’s right the way its written. And its not a 16MB+ buffer, its a 512MB+ buffer!

Typically whenever a block of samples are manipulated, they are measured by a 32-bit integer. But since we want to be able to deal with large audio files, offsets and total sample counts are usually specified with 64-bit integers.