IltmmAudioInput::get_Bass Example for C

void IltmmAudioInput_get_Bass_Example (IltmmCapture* pCapture) 
{ 
   IltmmAudioInputs *pAudioInputs = NULL;  
 
   HRESULT hr = IltmmCapture_get_AudioInputs(pCapture, &pAudioInputs);  
 
   if (SUCCEEDED(hr) && pAudioInputs)  
   { 
      long lCount, i;  
 
      IltmmAudioInputs_get_Count(pAudioInputs, &lCount);  
 
      for (i = 0; i < lCount; i++) 
      { 
         IltmmAudioInput *pAudioInput = NULL;  
 
         hr = IltmmAudioInputs_Item(pAudioInputs, i, &pAudioInput);  
 
         if (SUCCEEDED(hr) && pAudioInput)  
         { 
            BSTR bstrName, bstrFriendlyName;  
            VARIANT_BOOL vrtEnable, vrtMono, vrtLoudness;  
            double dTrebleRange, dBassRange, dMixLevel, dPan, dTreble, dBass;  
            long lCurrentIndex;  
 
            IltmmAudioInput_get_Name(pAudioInput, &bstrName);  
 
            IltmmAudioInputs_Find(pAudioInputs, bstrName, &lCurrentIndex);  
 
            if (lCurrentIndex != i)  
               MessageBox(NULL, "Index not found", NULL, MB_OK);  
 
            IltmmAudioInput_get_FriendlyName(pAudioInput, &bstrFriendlyName);  
 
            IltmmAudioInput_put_Enable(pAudioInput, VARIANT_TRUE);  
            IltmmAudioInput_put_Mono(pAudioInput, VARIANT_FALSE);  
            IltmmAudioInput_put_MixLevel(pAudioInput, 1.0);  
            IltmmAudioInput_put_Pan(pAudioInput, 0.0);  
            IltmmAudioInput_put_Loudness(pAudioInput, VARIANT_TRUE);  
 
            IltmmAudioInput_get_TrebleRange(pAudioInput, &dTrebleRange);  
            IltmmAudioInput_put_Treble(pAudioInput, dTrebleRange / 2.0);  
 
            IltmmAudioInput_get_BassRange(pAudioInput, &dBassRange);  
            IltmmAudioInput_put_Bass(pAudioInput, dBassRange / 2.0);  
 
            IltmmAudioInput_get_Enable(pAudioInput, &vrtEnable);  
            IltmmAudioInput_get_Mono(pAudioInput, &vrtMono);  
            IltmmAudioInput_get_MixLevel(pAudioInput, &dMixLevel);  
            IltmmAudioInput_get_Pan(pAudioInput, &dPan);  
            IltmmAudioInput_get_Loudness(pAudioInput, &vrtLoudness);  
            IltmmAudioInput_get_Treble(pAudioInput, &dTreble);  
            IltmmAudioInput_get_Bass(pAudioInput, &dBass);  
             
            SysFreeString(bstrName);  
            SysFreeString(bstrFriendlyName);  
 
            IltmmAudioInput_Release(pAudioInput);  
         } 
      } 
 
      IltmmAudioInputs_Release(pAudioInputs);  
   } 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Multimedia C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.