rec / recs

🎬 recs: the Universal Recorder 🎬
MIT License
2 stars 1 forks source link

Actually try to write a really long .wav file and make sure it really works #51

Closed rec closed 1 year ago

rec commented 1 year ago

We want to write 4GB + a bit of file.

in other words, 0x1_0001_000

Our largest frame is 8 bytes - 2 channels of 4 byte input

Write 0x1_0000 blocks of size 0x1_0008 = 2 x 4 x 0x2001

rec commented 1 year ago

So, it just kept writing, and the file was fine!

Turns out the file is "fine", not fine: https://www.diyaudio.com/community/threads/large-wav-file-problem.26673/

  1. Fix that.
  2. Add an --ignore-max-file-size flag that redoes that.
rec commented 1 year ago

In testing, now it looks as if we write files that are a few bytes bigger than the max. OOOPS.

It's probably something to do with our fixed Subtype code, but I can get the files to the exact size, and I should.


Once that's squared away, I should make a little test with AIF files to see what size their header is written as, since AIF is so very close in format to WAV.