turn vin pin on and off

hello, if i have two 9v wall adapters, one plugged into normal arduino input and another into vin and ground...is there anyway i can turn the vin on and off? I have a sensor and when it's activated, I want speakers to turn on and make a bunch of noise. the problem is, is when the speakers are always on they make a loud hiss...(they are really amped up in a 386 circuit) so i just want them on when they need to make noise. thanks

The short answer is, "no.," you can't turn Vin on and off. It is, as its name suggests, strictly an input.

No, the barrel jack and the Vin pin are the same node.

To clarify what James is saying here -- the power connector on the edge of the board and the Vin pin are electrically connected, with no kind of switch or logic between them, so there's nothing you can do in code to make them not-connected. You should only hook up to one of them.

As for your actual problem -- you could use a relay to turn the power to the speakers on and off, without interrupting the Arduino's power. You just need to put the relay in the right place :)