pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

C++ pastebin - collaborative debugging tool View Help


Posted by Nick Brooks on Tue 13 Oct 15:34
report abuse | View followups from Anonymous | download | new post

  1.  
  2. // !!!!!!!!!! function which changes the volume :
  3.  
  4. void VoodooHDADevice::gmixerSetDefaults(PcmDevice *pcmDevice, UInt16 newVolInt)
  5. {
  6.  
  7. logMsg("gmixer setting defaults");
  8. for (int n = 0; n < SOUND_MIXER_NRDEVICES; n++){
  9. audioCtlOssMixerSet(pcmDevice, n, newVolInt, newVolInt);
  10. logMsg("Control integer::%p\n",n);
  11. }
  12. //if (audioCtlOssMixerSetRecSrc(pcmDevice, SOUND_MASK_MIC) == 0)
  13. //errorMsg("warning: couldn't set recording source to microphone\n");
  14. }
  15.  
  16. //  !!!!!!!!!  volume change handler :
  17.  
  18. IOReturn VoodooHDAEngine::volumeChanged(IOAudioControl *volumeControl, SInt32 oldValue, SInt32 newValue)
  19. {
  20.  
  21. IOLog("VoodooHDAEngine0.1[%p]::volumeChanged(%p, %ld, %ld)\n", this, volumeControl, oldValue, newValue);
  22.  
  23. int ossDev = ( getEngineDirection() == kIOAudioStreamDirectionOutput) ? SOUND_MIXER_VOLUME:
  24. SOUND_MIXER_MIC;
  25.  
  26. PcmDevice *pcmDevice = mChannel->pcmDevice;
  27.  
  28.  
  29. mDevice->gmixerSetDefaults(pcmDevice,newValue);
  30.  
  31. return kIOReturnSuccess;
  32. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post