Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVAudioSession on desktop?

On mac desktop I was trying to record system sound (and optionally microphone sound - but for starting I was just doing system sound).

I was following this guide - https://www.appcoda.com/ios-avfoundation-framework-tutorial/

However I keep getting:

 songifier.mm:8:9: fatal error: 'AVFoundation/AVAudioSession.h' file not found

import

I am compiling with:

gcc -framework Cocoa -framework Foundation -framework Carbon -framework AppKit -framework AVFoundation -lstdc++ -o songifier songifier.mm

Does anyone know how to use AVAudioSession this from desktop to record system audio?

like image 416
Noitidart Avatar asked Oct 17 '25 05:10

Noitidart


1 Answers

There is no AVAudioSession for the desktop - that code will have to be excluded from anything you compile for macos.

like image 154
Rhythmic Fistman Avatar answered Oct 18 '25 19:10

Rhythmic Fistman