Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // !!!!!!!!!! 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement