flac does not properly handle "keep-foreign-metadata" with format "aiff" and codec "sowt" and does not report any warnings:
- the header is saved as is, along with all the empty space, in my case it is already 15 megabytes!
- some header blocks are lost after restoration,
- after unpacking, the order of the sowt data is lost and is given in a typical PCM.
Yes, I understand that flac does not promise to archive the title, but 15 megabytes, besides filled exclusively with 0x00, you see, this is already too much.
Yes, I understand that the byte order does not matter, and flac does not promise to restore "aifc" as it is (although I would like to use it as a universal archiver for audio), but I would like to see a warning about this, and even better to receive it in "errorlevel" console some distinguishable error about all situations.
An example file can be found here:
https://soundcloud.com/professorkliq/sunset-op-1-sketch
Button "More" => "Download file"
The problem here is that the foreign metadata is larger than the 16MB allowed maximum by FLAC, triggering some bugs. Do you have any idea what kind of chunk this is? It seems of the 63.504.112 bytes of that AIF file, only 47.424.520 contain actual audio, it seems the rest is some sort of metadata.
I'll look into adding errors when this happens, but I cannot change FLAC to accept this data: the 16MB limit is one of the format and cannot be changed without breaking backward compatibility.
I don't know what kind of chunk it is, the author creates a file on the "OP-1 sketch sequencer" device, so this is probably some kind of padding hardwired by the manufacturer according to some kind of standard or for his own purposes.
In general, I just thought that such extra-data with the "keep-foreign-metadata" key can be stored compressed, anyway, when playing, they are never used and are not displayed anywhere, i.e. needed only to return the original file.
In addition, the "option" to archive everything that falls under "keep-foreign-metadata" saves space and is unlikely to ever exceed the format limit of 16Mb. Usually they have very sparse data that will compress well with anything.
No, FLAC does not compress foreign metadata.
Also, you are right that FLAC cannot restore AIFF data with sowt order. This is a limitation of the command line program
You might be interested in hearing that I'm working on fully incorporating aifc support, including restoring the sowt byte order. If you are willing to test this functionality, please let me know
Yes, I can look for and ask people I know about such files to test on them if it would help in any way. You can email me at my nickname tuta dot io, or on telegram at the same nickname, it will be easier and faster.