I'm trying to build a synchronous demodulator, where I'm looking for frequency components in an audio signal that are either in phase or out of phase with an externally-generated 50% duty-cycle clock. One approach is to use a circuit that has a switchable gain of either +1 or -1. The gain control signal will come from a logic level 50% duty-cycle clock . Circuit should have small offset between +1 and -1 gain. Supply voltage is single ended 9V.
You can use an all-pass filter circuit such as this with R1 = R2 but substitute an analog switch for the capacitor. The offset will be determined by the op amp characteristics and the tolerance ratio of R1 to R2.
Alternately if you can switch the phase of the clock instead, then an XOR gate would do that.