@Rail_Jon_Rogut The WAV format writer actually takes care of this for you - if you write more than 2^32 bytes it should automatically switch into RF64 mode without needing to do anything.
@flacours Sure, that expression would overflow if given a huge number, but numSamples isn’t the length of the whole file, it’s just the length of the single block of data that you’re appending to it… i.e. a block that will typically never exceed a few KB! I guess that if you were trying to write a huge block of data from a memory-mapped file then it could be a problem so I’ll tweak it to cope with that, but it’d be a very very obscure edge-case use of the class!
…actually, just looking at the method, it’d be insane to call that method with a huge block of data, because it has to be copied and re-structured in a temp memory block before being written, so if you called it with 2^32 samples, it’d be allocating and copying gigabytes each time!