If you think you might stop at two CD players, a Xantech CC12 will work for you. I use it, and its bigger brother the CC62, for this and other switching purposes. I suggest this because if you need just two CD players, the CC12 is less expensive than the Xantech RT8 or gatekeeper.
The CC12 is one double-pole double-throw relay. You feed a control signal to the CC12, and a SEPARATE IR signal to the common terminals of the relay. The IR signal then gets switched to one or the other switched contacts of the relay, and an LED for one machine is hooked to one set of outputs, the other to the other.
The LED emitter itself must be covered so that its IR light does not reach the other machine.
By the way, aside from the theoretical and classy fact that it would be cool to switch one CD player, and one only, at a time, what would be the problem with allowing this to happen? If you have to use two amp inputs because you cannot daisy chain the model you have, what would be the problem with both of them playing, aside from the coolness factor and the motor wear?
A good answer is easier with a clear question giving the make and model of everything. "The biggest problem in communication is the illusion that it has taken place." -- G. “Bernie” Shaw