![]() ![]() So my questions is: Is this really setting the microphone's gain at the hardware level (and what I'm seeing is just a physical limitation of the internal mic), or do I not understand the proper use of an AKNode in a mixer? The result is that my input levels are lower, but there is still clipping. But it isn't clear to me if I am to set the gain on the AKMicrophone or the AKMixer (for the instance created by AKStereoFieldLimiter). I can play around with AKBooster to set the gain on an AKNode instance. I'm working with the Recorder sample in AudioKit. This is all rather fuzzy to me at the moment, but I suppose that I could use AudioUnits and a mixer, then maybe set the gain on the input? That brings me to AudioKit. So it looks like I need to drop down to a lower level. On an iPhone XR, inputGainSettable always returns false, even with an external mic, and setInputGain always fails. On the old iPad, except for the gain setting limitation described above, AVFoundation audio capture works well, especially when I use an external mic (I can set the gain to anything between 0 and 1, and the recorded audio is what I expect). I've had other problems with AVFoundation for audio capture. ![]() At 0.7, there is a noticeable difference than at 1.0, but I still don't really know what is happening under the covers: is the actual input level lower or are the samples "pre-processed" to lower absolute values? Anything lower doesn't produce any errors, but inputGain is set to 0.7. What's weird is that setInputGain works fine if the range is between 0.7 and 1.0. Using AVAudioSession.inputGainSettable returns true, oddly enough, on my iPad's internal mic. ![]() So far I've played around with a variety of examples, including Xamarin and Xcode stuff. I've seen some YouTube vids where folks use GB to set gain on an internal mic. Using GB on my old iPad, I'm only able to set the gain if an external mic is connected (and it works perfectly). What I do know at this point is that apps like GarageBand are capable of setting input gain on some devices. I realize that there will be limitations on exactly what I can do with iPhone/iPad internal mic at least some mics will have physical limitations, especially on older/cheaper models. That is, it will likely not be nearly enough to simply do some sort of multiplication on the received samples, so I want to set the gain at the hardware level. The deal is that I need to be able to set the microphone's gain down, probably significantly. I'm new to all of this (Xcode, AudioKit), but what I want to create is an app that is capable of recording really loud audio (for example, acoustic drums). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |