Insert PCE in AAC payload on ADTS output when non standard channel layout such as 4ch(quad), 6ch, 6.1ch is in use.
Support 7.1ch rear for AAC (m4a/adts) by inserting PCE on qaac side. Mapping of 7.1ch rear input to 7.1ch front is dropped.
When non standard channel layout is used, PCE (program config element) is required to describe the channel layout. For MP4 container it is *****ded in GASpecificConfig. For ADTS, since there's no such place in the header, PCE has to be periodically inserted in the AAC payload.
Since Apple codec doesn't support ADTS transmux, it does not insert PCE in AAC payload but writes PCE into "magic cookie" that contains GASpecificConfig. On the other hand, qaac has not been modifying AAC bitstream produced by the codec. As a natural consequence, ADTS output with non standard channel layout was lacking PCE support. This issue is fixed on this version.
As a good side effect, I also added support for 7.1ch rear. Before this version, 7.1ch rear input has been mapped to 7.1ch front as a compromise, that is not a very right thing to do. Since 7.1ch front and 7.1ch rear are the same in the AAC channel elements level (both of them are encoded as SCE+PCE+PCE+PCE+LFE), 7.1ch rear can be achieved by encoding as 7.1ch front and inserting PCE afterwards.
Since automatic mapping from 7.1ch rear to 7.1ch front is note dropped, 7.1ch rear input cannot be encoded as ALAC. It is not supported for CAF output too.
If you are a ffmpeg user, note that standard 7.1ch front AAC requires "-strict 1" to decode in the correct channel layout. It is due to historical reason that AAC encoders (including Nero and qaac) has been wildly mapping 7.1ch rear to 7.1ch front.