When using your Macbook to project, either directly or through an Apple TV, you may experience problems with your projected display or audio output if your Macbook goes to sleep while connected.
We recommend that you either change the sleep time on your Mac, or you disconnect your Mac from your presentation device before leaving it alone long enough to sleep / closing the lid.
Audio is muted after Macbook sleeps while connected to AppleTV
Your Macbook may still be trying to redirect your audio to the AppleTV. Go to System Preferences > Audio and ensure the output device is set to Speakers instead of AppleTV.