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

IltmmAudioInputs::put_Enable Example for C++

Show in webframe

void EnableAudioInput(IltmmAudioInputs *pAudioInputs)
{
   VARIANT_BOOL bEnable;
   long lCount;

   // Disable all inputs:
   pAudioInputs->put_Enable(VARIANT_FALSE);

    // Now enable the first input:
   pAudioInputs->get_Count(&lCount); 
   if (lCount > 0)
   {
      IltmmAudioInput *pAudioInput = NULL; 
      HRESULT hr = pAudioInputs->Item(0, &pAudioInput); 
      if (SUCCEEDED(hr) && pAudioInput) 
      {
         pAudioInput->put_Enable(VARIANT_TRUE);
      }
      pAudioInput->Release();
   }

   // Check if the input is enabled:
   pAudioInputs->get_Enable(&bEnable);
   if (bEnable == VARIANT_TRUE)
      AfxMessageBox(TEXT("An input is enabled"));
   else
      AfxMessageBox(TEXT("All inputs are disabled"));
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.