I own an Apple TV at home and have an Apple TV at work. I play audio through my home's stereo system fairly often. Whenever I get into the office while being previously connected to the Apple TV at home, my Mac connects to one of the Apple TVs at my office. How can I prevent my Mac from doing that?
If you use airplay then this might work for you.
Change your Apple TV Name (Apple TV software version 6.1 and later)
Go to Settings > AirPlay > Apple TV Name > Custom.
Use this setting to change the name of the Apple TV to distinguish it from other Apple TVs on the same network.
Or in iTunes select the output