#NEWLINE# def update_labels( self ) : #NEWLINE# #INDENT# record_button = self . ids [ 'record_button' ] #NEWLINE# play_button = record_button . ids [ 'play_button' ] #NEWLINE# state_label = self . ids [ 'state_label' ] #NEWLINE# state = self . audio . state #NEWLINE# state_label . text = ( 'AudioPlayer State: ' + state ) #NEWLINE# play_button . disabled = ( not self . has_record ) #NEWLINE# if ( state == 'ready' ) : #NEWLINE# #INDENT# record_button . text = 'Start Recording' #NEWLINE# #UNINDENT# if ( state == 'recording' ) : #NEWLINE# #INDENT# record_button . text = 'Press to Stop Recording' #NEWLINE# play_button . disabled = True #NEWLINE# #UNINDENT# if ( state == 'playing' ) : #NEWLINE# #INDENT# play_button . text = 'Stop' #NEWLINE# record_button . disabled = True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# play_button . text = 'Press to play' #NEWLINE# record_button . disabled = False