sources
function which changes the volume :void VoodooHDADevice::gmixerSetDefaults(PcmDevice *pcmDevice, UInt16 newVolInt)
{
logMsg("gmixer setting defaults");
for (int n = 0; n < SOUND_MIXER_NRDEVICES; n++){
audioCtlOssMixerSet(pcmDevice, n, newVolInt, newVolInt);
logMsg("Control integer::%p\n",n);
}
//if (audioCtlOssMixerSetRecSrc(pcmDevice, SOUND_MASK_MIC) == 0)
//errorMsg("warning: couldn't set recording source to microphone\n");
}
volume change handler :
IOReturn VoodooHDAEngine::volumeChanged(IOAudioControl *volumeControl, SInt32 oldValue, SInt32 newValue)
{
IOLog("VoodooHDAEngine0.1[%p]::volumeChanged(%p, %ld, %ld)\n", this, volumeControl, oldValue, newValue);
int ossDev = ( getEngineDirection() == kIOAudioStreamDirectionOutput) ? SOUND_MIXER_VOLUME:
SOUND_MIXER_MIC;
PcmDevice *pcmDevice = mChannel->pcmDevice;
mDevice->gmixerSetDefaults(pcmDevice,newValue);
return kIOReturnSuccess;
}
pastebin :
http://pastebin.com/f75f00c76will post the 64 bit version on wednesday (the one after wednesday the 14th)