Changeset 590
- Timestamp:
- Feb 25, 2016, 4:24:06 AM (7 years ago)
- Location:
- trunk/Utilities/EnumerateAudioDevices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/EnumerateAudioDevices/EnumerateAudioDevices.rc
r522 r590 116 116 117 117 VS_VERSION_INFO VERSIONINFO 118 FILEVERSION 1, 0, 0, 6 2118 FILEVERSION 1, 0, 0, 65 119 119 PRODUCTVERSION 1,0,0,1 120 120 FILEFLAGSMASK 0x3fL … … 135 135 VALUE "Created By", "Roman Ryltsov <roman@alax.info>" 136 136 VALUE "FileDescription", "Enumerate WASAPI Audio Devices Utility" 137 VALUE "FileVersion", "1, 0, 0, 6 2\0"137 VALUE "FileVersion", "1, 0, 0, 65\0" 138 138 VALUE "InternalName", "EnumerateAudioDevices" 139 139 VALUE "LegalCopyright", "Copyright © Alax.Info, Roman Ryltsov, 2008-2011" -
trunk/Utilities/EnumerateAudioDevices/MainDialog.h
r522 r590 10 10 #include <propkey.h> 11 11 #include <devpkey.h> 12 #include <devicetopology.h> 12 13 #include "AboutDialog.h" 13 14 … … 1335 1336 } 1336 1337 #pragma endregion 1338 #pragma region IDeviceTopology 1339 _ATLTRY 1340 { 1341 // TODO: Make it nice 1342 // NOTE: http://stackoverflow.com/questions/34025791/how-to-get-jack-information-of-audio-device-in-ms-windows-7 1343 CComPtr<IDeviceTopology> pDeviceTopology; 1344 __C(pMmDevice->Activate(__uuidof(IDeviceTopology), CLSCTX_ALL, NULL, (VOID**) &pDeviceTopology)); 1345 HRESULT hr; 1346 CComPtr<IConnector> pConnector; 1347 hr = pDeviceTopology->GetConnector(0, &pConnector); 1348 if(SUCCEEDED(hr)) 1349 { 1350 CComPtr<IConnector> connectedTo; 1351 hr = pConnector->GetConnectedTo(&connectedTo); 1352 if(SUCCEEDED(hr)) 1353 { 1354 CComPtr<IPart> part; 1355 hr = connectedTo->QueryInterface(&part); 1356 if (SUCCEEDED(hr)) 1357 { 1358 CComPtr<IKsJackDescription> jack; 1359 hr = part->Activate(CLSCTX_ALL, IID_PPV_ARGS(&jack)); 1360 if (SUCCEEDED(hr)) 1361 { 1362 UINT jackCount = 0; 1363 jack->GetJackCount(&jackCount); 1364 for (int j = 0; j < jackCount; j++) 1365 { 1366 KSJACK_DESCRIPTION desc = { 0 }; 1367 jack->GetJackDescription(j, &desc); 1368 sText.AppendFormat(_T("\t") _T("\t") _T("ChannelMapping\t%i\r\n"), desc.ChannelMapping); 1369 sText.AppendFormat(_T("\t") _T("\t") _T("ConnectionType\t%i\r\n"), desc.ConnectionType); 1370 sText.AppendFormat(_T("\t") _T("\t") _T("IsConnected\t%i\r\n"), desc.IsConnected); 1371 sText.AppendFormat(_T("\t") _T("\t") _T("Color\t0x%08X\r\n"), desc.Color); 1372 } 1373 } 1374 } 1375 } 1376 } 1377 } 1378 _ATLCATCHALL() 1379 { 1380 _Z_EXCEPTION(); 1381 } 1382 #pragma endregion 1337 1383 } 1338 1384 _ATLCATCH(Exception)
Note: See TracChangeset
for help on using the changeset viewer.