-->

AVAudioRecorder and AirPlay Mirrioring

2019-07-13 03:45发布

问题:

When I have an AVAudioRecorder Session active - (when I'm recording audio) I can't activate AirPlay mirroring on the device. Airplay mirroring just deactivates while the app is running and switches it back on when the app exits. This post seems to suggest there is no way around this.

My thoughts are to try:

  • using a lower level recording framework
  • or outputting a separate window to external display, rather than mirroring (I've tried this, it doesn't work).

Is there another way around this, or do you know whether either of these methods are known to work?

回答1:

Using AudioQueue to record (like Apple's Sample Code Speak Here) rather than the AVRecorder works. A bit more work to implement, but recording continues on or off Airplay mirroring.