IltmmAudioInput::get_Bass Example for C++

void GetAudioBass(IltmmCapture *pCapture)
{
   IltmmAudioInputs *pAudioInputs = NULL;
   HRESULT hr = pCapture->get_AudioInputs(&pAudioInputs);

   if (SUCCEEDED(hr) && pAudioInputs)
   {
      long lCount, i;
      pAudioInputs->get_Count(&lCount);
      for (i = 0; i < lCount; i++)
      {
         IltmmAudioInput *pAudioInput = NULL;
         hr = pAudioInputs->Item(i, &pAudioInput);
         if (SUCCEEDED(hr) && pAudioInput)
         {
            BSTR bstrName, bstrFriendlyName;
            VARIANT_BOOL vrtEnable, vrtMono, vrtLoudness;
            double dTrebleRange, dBassRange, dMixLevel, dPan, dTreble, dBass;
            long lCurrentIndex;
            pAudioInput->get_Name(&bstrName);
            pAudioInputs->Find(bstrName, &lCurrentIndex);
            if (lCurrentIndex != i)
               AfxMessageBox(TEXT("Index not found"));
            pAudioInput->get_FriendlyName(&bstrFriendlyName);
            pAudioInput->put_Enable(VARIANT_TRUE);
            pAudioInput->put_Mono(VARIANT_FALSE);
            pAudioInput->put_MixLevel(1.0);
            pAudioInput->put_Pan(0.0);
            pAudioInput->put_Loudness(VARIANT_TRUE);
            pAudioInput->get_TrebleRange(&dTrebleRange);
            pAudioInput->put_Treble(dTrebleRange / 2.0);
            pAudioInput->get_BassRange(&dBassRange);
            pAudioInput->put_Bass(dBassRange / 2.0);
            pAudioInput->get_Enable(&vrtEnable);
            pAudioInput->get_Mono(&vrtMono);
            pAudioInput->get_MixLevel(&dMixLevel);
            pAudioInput->get_Pan(&dPan);
            pAudioInput->get_Loudness(&vrtLoudness);
            pAudioInput->get_Treble(&dTreble);
            pAudioInput->get_Bass(&dBass);
            SysFreeString(bstrName);
            SysFreeString(bstrFriendlyName);
            pAudioInput->Release();
         }
      }
      pAudioInputs->Release();
   }
}