Cleanup
[ampy.git] / devices.py
1 #!/usr/bin/python3
2
3 import pyaudio
4
5 p = pyaudio.PyAudio()
6
7 print('Listing api:')
8 for i in range(p.get_host_api_count()):
9     print(i, p.get_host_api_info_by_index(i)['name'])
10
11 print('Listing devices:')
12 for i in range(p.get_device_count()):
13     print(i, p.get_device_info_by_index(i)['name'])