I'm trying to record audio in a separate thread (actually two, but it doesn't work with even just one). Here's a full working example, which breaks if I use the line that is commented out.
This prints out "Recording" and then "Exiting" once one second has passed, as expected. If I use the line commented out, nothing prints out. If I call record() normally in the main thread, everything works just fine.
self.sound_file_name = u'C:\\data\\sound.wav'
self.lock = e32.Ao_lock()
appuifw.app.exit_key_handler = self.quit
self.sound_file = audio.Sound.open(self.sound_file_name)
self.recording = True
if __name__ == '__main__':
example = Example()
Can someone tell what I'm doing wrong here?