Re: [coreAudio] Detecting corrupted files
Re: [coreAudio] Detecting corrupted files
- Subject: Re: [coreAudio] Detecting corrupted files
- From: lazzaro <email@hidden>
- Date: Wed, 8 Mar 2006 12:17:58 -0800
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.
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.
---
John Lazzaro
http://www.cs.berkeley.edu/~lazzaro
lazzaro [at] cs [dot] berkeley [dot] edu
---
_______________________________________________
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