@@ -70,15 +70,15 @@ def callback(indata, frames, time, status):
7070 if status :
7171 text = ' ' + str (status ) + ' '
7272 print ('\x1b [34;40m' , text .center (args .columns , '#' ),
73- '\x1b [0m' , sep = '' , flush = True )
73+ '\x1b [0m' , sep = '' )
7474 if any (indata ):
7575 magnitude = np .abs (np .fft .rfft (indata [:, 0 ], n = fftsize ))
7676 magnitude *= args .gain / fftsize
7777 line = (gradient [int (np .clip (x , 0 , 1 ) * (len (gradient ) - 1 ))]
7878 for x in magnitude [low_bin :low_bin + args .columns ])
79- print (* line , sep = '' , end = '\x1b [0m\n ' , flush = True )
79+ print (* line , sep = '' , end = '\x1b [0m\n ' )
8080 else :
81- print ('no input' , flush = True )
81+ print ('no input' )
8282
8383 with sd .InputStream (device = args .device , channels = 1 , callback = callback ,
8484 blocksize = int (samplerate * args .block_duration / 1000 ),
@@ -94,7 +94,7 @@ def callback(indata, frames, time, status):
9494 args .gain /= 2
9595 else :
9696 print ('\x1b [31;40m' , usage_line .center (args .columns , '#' ),
97- '\x1b [0m' , sep = '' , flush = True )
97+ '\x1b [0m' , sep = '' )
9898 break
9999except KeyboardInterrupt :
100100 parser .exit ('Interrupted by user' )
0 commit comments