In the future, everything is possible But one would have to gather the info while the Sound is being recorded and then update the header at the end because the header comes after the recorded samples and you don't know where the end is until the recording is finished.
Alternatively, one could record triggers or gates (in response to your feature extraction Boolean test) on channels 3 & 4 while recording onto channels 1 & 2. You then could use channels 3 & 4 as control signals playing in parallel with your stereo recording.