File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,14 +113,14 @@ def _try_initializing_pyaudio(fun_name):
113113def device_info (verbose = True ):
114114 """Return a formatted string about available audio devices and their info"""
115115 pa = _try_initializing_pyaudio ("device_info" )
116- line1 = ( f"idx { 'Device Name' :25} { 'INP' :4} { 'OUT' :4} SR INP-(Lo|Hi) OUT-(Lo/Hi) (Latency in ms)" )
116+ line1 = f"idx { 'Device Name' :25} { 'INP' :4} { 'OUT' :4} SR INP-(Lo|Hi) OUT-(Lo/Hi) (Latency in ms)"
117117 devs = [pa .get_device_info_by_index (i ) for i in range (pa .get_device_count ())]
118118 lines = [line1 ]
119119 for i , d in enumerate (devs ):
120120 p1 = f"{ i :<4g} { d ['name' ].strip ():24} { d ['maxInputChannels' ]:4} { d ['maxOutputChannels' ]:4} "
121121 p2 = f" { int (d ['defaultSampleRate' ])} "
122- p3 = f"{ d ['defaultLowInputLatency' ]* 1000 :6.2g} { d ['defaultHighInputLatency' ]* 1000 :6.0f} "
123- p4 = f"{ d ['defaultLowOutputLatency' ]* 1000 :6.2g} { d ['defaultHighOutputLatency' ]* 1000 :6.0f} "
122+ p3 = f"{ d ['defaultLowInputLatency' ] * 1000 :6.2g} { d ['defaultHighInputLatency' ] * 1000 :6.0f} "
123+ p4 = f"{ d ['defaultLowOutputLatency' ] * 1000 :6.2g} { d ['defaultHighOutputLatency' ] * 1000 :6.0f} "
124124 lines .append (p1 + p2 + p3 + p4 )
125125 if verbose :
126126 print (* lines , sep = "\n " )
You can’t perform that action at this time.
0 commit comments