Is there a connector that breaks the default circuit when a plug is connected? (e.g. cut off speaker when headphones are connected)
The integrated switches are the easiest and most common way of switching off other audio paths.  You can find 48 examples here.