Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Multimedia API Help

IltmmAudioInput::get_Bass Example for C++

Show in webframe

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();
   }
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.