For any reason I can’t write flac properly. it keeps missing like 40ms of the audio or if the audio is shorter it’s just 0 file with some flac metadata that most software does not recognize.
The thing is I tried with wav too and it first acted like the same but then I used flush() for the writer before writing the memoryblock to a file and that seemed to work for the wav-file. flush for wav writes the metadata that was probably one thing missing.
But for Flac there’s no flush-method (it’s empty, virtual method from it’s parent) to finish the file.
I tested to evilishly delete the writer to force flac encoder to finish things and it kinda worked -metadata was written and the file worked, but the program crashes due to this after out of scope.
How am I supposed to use flac and AudioFormatWriter properly?