def get_portaudio_version(): """ Returns portaudio version. :rtype: str """ return pa.get_version()
""" PyAudio Example: Low Level C Module test. Display detected Host APIs and Devices. """ import _portaudio as p p.initialize() max_apis = p.get_host_api_count() max_devs = p.get_device_count() print "\nPortAudio System Info:\n======================" print "Version: %d" % p.get_version() print "Version Text: %s" % p.get_version_text() print "Number of Host APIs: %d" % max_apis print "Number of Devices : %d" % max_devs print "\nHost APIs:\n==========" for i in range(max_apis): apiinfo = p.get_host_api_info(i) print "Number : ", i print "Name : ", apiinfo.name print "Type : ", apiinfo.type print "Devices : ", apiinfo.deviceCount print "defaultInputDevice : ", apiinfo.defaultInputDevice print "defaultOutputDevice : ", apiinfo.defaultOutputDevice print "--------------------------" print "\nDevices:\n========"