Re: [coreAudio] Detecting corrupted files
Re: [coreAudio] Detecting corrupted files
- Subject: Re: [coreAudio] Detecting corrupted files
- From: Jeff Moore <email@hidden>
- Date: Wed, 8 Mar 2006 18:21:16 -0800
NSTask is a Foundation object that facilitates launching and
communication with sub-processes. It is fairly well documented here:
http://developer.apple.com/documentation/Cocoa/Conceptual/
OperatingSystem/index.html
On Mar 8, 2006, at 6:10 PM, Alexander von Below wrote:
I know this may be a little off-list, but would using a pthread be
an alternative?
I would really, really hate to but the entire file reading into a
separate child process -- and I must admit I have never tried
forking a Cocoa app, and communicating.
Sorry to be bothering you all with this, but this bug was not
expected, and I am trying to find the quickest way for a workaround.
Alex
On 08.03.2006, at 21:17, lazzaro wrote:
One option is for your main process fork off a UNIX helper process
that tries to read the MP3 file. The main and helper processes use
a shared variable to signal how the fileread is coming along.
The helper process updates the shared variable once the function call
with the potential to hang returns. The main process checks the
shared
variable every few seconds, and if it isn't updated by a certain
"worst-case"
time, it kills the child process and reports "unreadable file" to
the user.
On Mar 8, 2006, at 12:02 PM, email@hidden
wrote:
This is very bad news for us, and I would appreciate if someone
could
suggest another workaround. And just to clarify: If CoreAudio can
not
read this file, that's fair enough. I have no idea where it came
from, how it was encoded etc. But I need to know when it can not be
read.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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