Re: [coreAudio] Detecting corrupted files
Re: [coreAudio] Detecting corrupted files
- Subject: Re: [coreAudio] Detecting corrupted files
- From: philippe wicker <email@hidden>
- Date: Thu, 9 Mar 2006 10:37:42 +0100
On Mar 9, 2006, at 9:09 AM, Martin Hairer wrote:
Yes. If you have a number of files to read you could launch
several "worker" threads (2 to 4 would be a good number) and wait
for their completion in your main thread. This way, your main loop
stay ready to serve any GUI events. You can periodically wake up
the main loop (e.g. using a CFRunLoop Timer) and then check the
progress of the worker threads. If one is hanging - ie taking too
much time to do its job - you can kill it (pthread_kill).
If however it is true that the buggy AudioFile call eats up tons of
memory and eventually crashes,
the problem with a pthread is that you'll have to kill it before it
crashes your app and that you will
not recover the lost RAM. A child process can crash or do whatever
nasty things it wants to, it
won't affect your App. Regards,
Good point :)
Martin
HairerSoft
http://www.hairersoft.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden