Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a Audio Device driver to capture sound Mac is playing?

I have created some code to do a screen capture to mov file using AV Foundation and my next step is to also record what sounds Mac is playing for later adding to the recorded video. I have done some digging and appears I might need to implement some kind of Audio Driver to capture the audio. Any pointers on how to achieve this?

I assume AudioUnit and IOKit will be needed in some manner...

Thanks in advance.

like image 426
Equinox2000 Avatar asked Dec 09 '22 22:12

Equinox2000


2 Answers

The book OS X and iOS Kernel Programming by Ole Henry Halvorsen and Douglas Clarke has an example that does pretty much exactly this. You can download the example from the book's website, the book itself of course explains how it works.

Disclosure: I was one of the tech reviewers for this book. (I don't receive royalties etc.)

like image 67
pmdj Avatar answered Apr 28 '23 22:04

pmdj


You should also check out the source code for Soundflower:

http://code.google.com/p/soundflower/

like image 38
Nik Reiman Avatar answered Apr 28 '23 23:04

Nik Reiman