I want to increase my virtual audio device gain. The Volume is turned all the way up but I can barely hear the audio. To do this I think we should look at the gain IOAudioLevelControl::createVolumeControl
in IOAudioDevice. This is Soundflower code
// Gain control for each channel
control = IOAudioLevelControl::createVolumeControl(SoundflowerDevice::kGainMax, // Initial value
0, // min value
SoundflowerDevice::kGainMax, // max value
0, // min 0.0 in IOFixed
(40 << 16) + (32768), // 72 in IOFixed (16.16)
channel, // kIOAudioControlChannelIDDefaultLeft,
channelNameMap[channel], // kIOAudioControlChannelNameLeft,
channel, // control ID - driver-defined
kIOAudioControlUsageInput);
addControl(control, (IOAudioControl::IntValueChangeHandler)gainChangeHandler);
It seems to me that I should change the 5th argument which does some black magic bit shifting but as I'm not sure how this works and how to change it. Thanks