I'm using PyAudio (which is just a Python wrapper for PortAudio) to register auditory responses from users; I want to create a little calibration animation involving a dot that dynamically grows and shrinks in response to the peak amplitude over a given sampling period.
The problem is that I can't translate amplitude to pixels meaningfully until I know what the maximum amplitude might be for any given device (PortAudio's API just describes this an unsigned long, and as I understand it, is just the unmodified amplitude as measured by the input device, whose range of values is going to vary basically on the quality of the gear).
Is there a way to have PortAudio report the maximum amplitude value possible from the input device (presumably once the stream is initialized)?