I’ve been working with Surround Sound and the new Apple TV a bit lately, and I can’t quite understand some of the results I’m seeing.
My setup:
- Apple TV connected to a Dolby Digital compliant receiver via HDMI. This receiver supports HDMI v1.4
- 5.1 speaker setup
I encode my audio files using Adobe Audition CC 2015. This version of Audition supports exporting ac3 and ec3 Dolby Digital and Dolby Digital Plus formats. The resulting ec3 files are 48KHz, 320bps with 5.1 channels.
My app uses AVAudioPlayer to play back these files. I set my audio session and preferred number of channels appropriately before starting playback.
When I have my Apple TV’s Audio/Video Surround mode set to Dolby Digital, everything works as I would expect. My receiver switches over to DD, and all sounds play on the correct channels. Querying my AVAudioSessions maxOutputNumberOfChannels returns 6, as I would expect.
If I leave the Apple TV in its default “auto” state, I get different results. The AVAudioSession maxOutputNumberOfChannels returns 8 (more than the receiver supports), and playing back my files results in a completely different (and wrong) channel mapping. I don’t see my receiver switch over to Dolby Digital like I do when the Apple TV is forced into Dolby Digital mode.
The last test I did was to export my audio files in pcm (wav) form. This results in surround sound files that work for all channels regardless of the Apple TV Dolby Digital setting (as I would expect since they aren’t Dolby Digital encoded). However, wav files are massive, and I really don’t want to go that route…
So what exactly is happening here? Why might I be seeing different channel mappings depending on the Apple TV audio setting?
My guess is that with Dolby Digital encoded files, leaving the Apple TV in auto mode causes the Apple TV to decode the files and send raw audio to the receiver, but with an incorrect channel mapping. If the Apple TV is in Dolby Digital=On mode, that enables HDMI passthrough and the receiver does the decoding of the file.
Is there a different way I should be encoding my files so that they are decoded correctly by both the Apple TV and receiver?