Simultaneously using Airplay and headphones I want to play iTunes simultaneously on AirPlay (AppleTV) in one room and via the headphone socket into my audio system in another room. I tried selecting the device in the Sound tab in System Preferences but selecting one option just turns off the other. Any ideas?
iTunes can stream to multiple output devices simultaneously and it's done inside the iTunes app, not the System Preferences.

Here are the steps from Apple Support Page:


Connect your computer, Apple TV, AirPort Express, or other AirPlay-enabled accessory to the same Wi-Fi network.
Open iTunes on your computer.
To the right of the volume slider in iTunes, click "AirPlay icon". You'll see this icon only when an AirPlay-enabled device is on the same Wi-Fi network.





Click the name of the device that you want to stream content to. The Apple TV  or speaker  icons next to each device show the type of content that you can stream.