Home:ALL Converter>Increasing Audio Device output Gain

Increasing Audio Device output Gain

Ask Time:2016-09-08T23:57:25         Author:lychee

Json Formatter

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

Author:lychee,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39395492/increasing-audio-device-output-gain
yy