I've looked everywhere, and I can't find a way to adjust the input volume of an input device for an AVCaptureSession. The best I can do, which doesn't help me at all, is get the levels of audio from the device by accessing the connections (AVCaptureConnections) from the AVCaptureAudioDataOutput - i.e., by monitoring the levels from a preview output. Is there any way to change the input gain, or even to get the audio input level directly in AVFoundation? I'm still learning a bit, so I apologize if I have missed anything obvious.
Edit: I should note that this is for OSX.
So, I used some info that He Was linked, along with some research into Core Audio, and I turned it into a github project. That way, other people wanting to change the input volume of a device while using AVFoundation don't have to reinvent the wheel. You can find the classes here: https://github.com/ewrobinson/ERVolumeAdjust
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With