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"));
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document