cleanup of code
This commit is contained in:
@@ -5,7 +5,8 @@ info = p.get_host_api_info_by_index(0)
|
|||||||
numdevices = info.get('deviceCount')
|
numdevices = info.get('deviceCount')
|
||||||
|
|
||||||
for i in range(0, numdevices):
|
for i in range(0, numdevices):
|
||||||
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
|
currDeviceInfo = p.get_device_info_by_host_api_device_index(0, i)
|
||||||
print("Input Device id ", i, " - ", p.get_device_info_by_host_api_device_index(0, i).get('name'))
|
if (currDeviceInfo.get('maxInputChannels')) > 0:
|
||||||
|
print("Input Device id ", i, " - ", currDeviceInfo.get('name'))
|
||||||
else:
|
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'))
|
||||||
|
|||||||
Reference in New Issue
Block a user