This fixes recording of in-game video in The Sims 2 Legacy Collection:
1. An AVI file created with AVIFileOpenW(... OF_CREATE) is currently not modifiable (in the absence of file access flags). The tests suggest that it is the case on Windows if using AVIFile class directly but not the case if using AVIFileOpenW(), so looks like missing OF_WRITE should be added in AVIFileOpenW and not inside the class implementation.
2. Then that files in AVIStreamWrite() (as reproduced in test in patch 3) when audio samples are not written one by one (must probably always be the case in practice). That fails the check in IAVIStream_fnWrite() (```if (This->sInfo.dwLength != start)``` for the ```This->sInfo.dwSampleSize != 0``` case). It looks like that check might be correct, but for fixed size samples the counting of dwLength is incorrect in the couple of places (which patch 3 is fixing). The rest of the code seems to correctly handle that and properly assume that dwLength is number of samples and a frame can contain multiple samples for fixed sample size (!=0).