3

Our app plays two audio streams at once: a Foreground (vocal) stream, and a background (music) stream. To handle playback we have 2 AVPlayer instances, one for foreground, and one for background.

With AirPlay 1, this works great. You choose the new route, and both streams start playing back on the selected devices.

With AirPlay 2, however, this does not work properly. Either the foreground audio, or the background audio will begin playback, and behave in a way that makes it seem like they're competing with one another. They never overlay properly.

Is there some way to make this work when streaming to AirPlay 2 devices (i.e. HomePod) without having to resort to completely rewriting our entire app using AVSampleBufferAudioRenderer?

Jeff
  • 4,751
  • 5
  • 31
  • 35
  • Did you ever find an answer for this? – Amit Oct 22 '18 at 22:29
  • @Amit No; my solution so far has been to attempt to detect when we're on an Airplay2 route and stop one of the players. Short of re-writing our entire audio engine I haven't figured out any way to properly address this. It seems like a major shortcoming relative to Airplay 1 – Jeff Oct 23 '18 at 23:10
  • Ah ok. Sounds good. Thanks! I'll update this if we find a solution. – Amit Oct 25 '18 at 14:19
  • Curious if there was ever a solution to this. – Aaron Wojnowski Jan 07 '22 at 02:44
  • i have this problem now, haven't found a solution so far – Stoyan Oct 19 '22 at 08:22

0 Answers0