| Reply | « Previous Thread | Next Thread » |
|
Hi,
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. Code:
import appuifw
import audio
import e32
import thread
class Example:
def __init__(self):
self.sound_file_name = u'C:\\data\\sound.wav'
self.lock = e32.Ao_lock()
def run(self):
appuifw.app.exit_key_handler = self.quit
self.sound_file = audio.Sound.open(self.sound_file_name)
self.recording = True
thread.start_new_thread(self.record, ())
self.lock.wait()
self.stop()
def record(self):
#self.sound_file.record()
print u'Recording'
e32.ao_sleep(1)
self.sound_file.stop()
print u'Exiting'
def stop(self):
print u'Stopping'
self.sound_file.close()
def quit(self):
print u'Quitting'
self.lock.signal()
if __name__ == '__main__':
example = Example()
example.run()
Can someone tell what I'm doing wrong here? |
| Antti Alien |
| View Public Profile |
| Find all posts by Antti Alien |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| [moved] can not install application in emulator | HAHAPrince | Symbian Tools & SDKs | 26 | 2009-04-02 21:34 |
| Getting audio recording volume level | souparnalodh | Symbian User Interface | 1 | 2009-01-07 09:36 |
| Audio recording and streaming on Series 60 devices (C++) | seekeru1 | General Symbian C++ | 9 | 2007-07-26 14:08 |
| Problem with Audio & Thread | ecio83 | Symbian Media (Graphics & Sounds) | 3 | 2007-07-16 17:45 |
| Nokia 6020 don't supports instalation of audio recording application, but has a... | zehdopulo | Mobile Java Media (Graphics & Sounds) | 1 | 2007-01-21 22:54 |