cleanup of code

This commit is contained in:
talksik
2023-04-27 11:44:04 -07:00
parent 77c085ba69
commit d0c4124092
@@ -5,7 +5,8 @@ info = p.get_host_api_info_by_index(0)
numdevices = info.get('deviceCount')
for i in range(0, numdevices):
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
currDeviceInfo = p.get_device_info_by_host_api_device_index(0, i)
if (currDeviceInfo.get('maxInputChannels')) > 0:
print("Input Device id ", i, " - ", currDeviceInfo.get('name'))
else:
print("Output Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
print("Output Device id ", i, " - ", currDeviceInfo.get('name'))