5

I'm using an AVCaptureSession to create a screen recording (OSX), but i'd also like to add the computer audio to it (not the microphone, but anything that's playing through the speakers) i'm not really sure how to do that so the first thing i tried was adding an audio device like so:

AVCaptureDevice *audioDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];

After adding this device the audio was recorded, but it sounded like it was captured through the microphone. Is it possible to actually capture the computer's output sound this way? like quicktime does.

Marius
  • 3,976
  • 5
  • 37
  • 52

1 Answers1

3

Here's an open source framework that supposedly makes it as easy to capture speaker output as it is a screenshot.

https://github.com/pje/WavTap

The home page for WavTap does mention that it requires kernel extension signing privileges to run under MacOS 10.10 & newer, and that requires signing into your Apple Developer Account and submitting this form. More information can be found here.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • Not so much of a viable solution, now that Kexts are out-of-the-question, and I think this guy was asking for a programmatic solution at the App level... not to hack the kernel for stealing audio. – Motti Shneor Nov 08 '21 at 19:13