#NEWLINE# def record( self , forever = True ) : #NEWLINE# #INDENT# 'record secToRecord seconds of audio.' #NEWLINE# while True : #NEWLINE# #INDENT# if self . threadsDieNow : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# for i in range ( self . chunksToRecord ) : #NEWLINE# #INDENT# self . audio [ ( i * forever . BUFFERSIZE ) : ( ( i + 1 ) * self . BUFFERSIZE ) ] = self . getAudio ( ) #NEWLINE# #UNINDENT# self . newAudio = True #NEWLINE# if ( forever == False ) : #NEWLINE# #INDENT# break