Speaker or line-out jack...

I stand corrected and I apologize for misleading you, I ASSUMED you meant stereo audio. A single circuit switch jack will do what you want to do for a monaural source. The suggestions about sensing when something is plugged in won't work as the sense signal... becomes part of the audio signal too. This idea has no merit...
From Magician: "Continuity testing usually works by passing a small amount of current throw 'through' a load"...
The "Load" is the Audio Amplifier input, not a place where you would want anything but Audio.
Re-read the post from me that begins "Quick one word answer NO. You have 4 2 wires that need to go to the jack...
The connection methods would be the same however, just two wires less. Trying to use the speaker audio presents another issue as what "Switches" off the speakers when the Line In plug is inserted?.

Doc