The codec ID looks kinda fishy for the multi-channel files - same happens at 16 bit: Codec 1 for stereo, but the strange one for multichannel. But since sox can deal with the strange Codec ID for 16 bit files, this doesn’t seem to be the cause of the issues.
@brad: maybe with this info, you can reproduce (and hopefully correct) the issue?
So I think I know what’s going on now… the junk chunk was a red herring and it’s related to the sample format.
Cantabile’s 24-bit record format writes the samples packed as 32-bit (mainly for performance reasons) and that’s what sox is complaining about - it wants the sample data tightly packed (reference)
I’ll look into providing support for this, but in the meantime you might as well use 32-bit integer - the file will be exactly the same size as 24-bit anyway.
Ugh. I obviously need a holiday. Turns out Cantabile does write 24-bit data tightly packed (forgotten that I changed that) but there was a problem with what it was writing in the header. Fixed for next build.