Crash in ExtAudioFileOpenURL on iPhone device with 3 threads
Crash in ExtAudioFileOpenURL on iPhone device with 3 threads
- Subject: Crash in ExtAudioFileOpenURL on iPhone device with 3 threads
- From: Mo DeJong <email@hidden>
- Date: Wed, 29 Apr 2009 18:05:19 -0700
Hi all
I have some code that works just fine when run from the GUI thread in an iPhone app, but I just tried to convert it to use threads and now I get the following crash in ExtAudioFileOpenURL():
#0 0x3023e356 in CFStringGetLength ()
#1 0x30247a24 in CFStringCompare ()
#2 0x33130b04 in ACTransformerCodec::CreateTransformer ()
#3 0x33181998 in ACAACHEDecoder_IOA2::ACAACHEDecoder_IOA2 ()
#4 0x3315fb24 in AudioCodecFactory<ACAACHEDecoder_IOA2>::AudioCodecFactory ()
#5 0x3315e43c in RegisterExternalAudioCodecs ()
#6 0x349503f8 in RegisterAudioCodecComponent ()
#7 0x349506d8 in RegisterEmbeddedAudioCodecs ()
#8 0x3492f208 in CheckLazyComponentRegistration ()
#9 0x3492f820 in AudioComponentFindNext ()
#10 0x3489afe8 in ConverterRegistry::GetInputFormatsSet ()
#11 0x3489b334 in ConverterRegistry::GetInputFormatsSize ()
#12 0x34895eac in AudioFormatGetPropertyInfo ()
#13 0x34977da8 in ExtAudioFile::GetExistingFileInfo ()
#14 0x34978124 in ExtAudioFile::Open ()
#15 0x3497dcac in ExtAudioFileOpenURL ()
I poked around in the other threads, and found this other thread that was also in a ext audio call:
#0 0x314192f8 in pwrite ()
#1 0x348ca6d8 in UnixFile_DataSource::WriteBytes ()
#2 0x348c9f74 in Cached_DataSource::WriteBytes ()
#3 0x348c83d4 in AudioFileObject::WriteBytes ()
#4 0x348c5318 in AudioFileObject::WritePackets ()
#5 0x348cfc50 in CAFAudioFile::WritePackets ()
#6 0x348c33c4 in AudioFileWritePackets ()
#7 0x3497b520 in ExtAudioFile::Write ()
#8 0x3497d32c in ExtAudioFileWrite ()
My code basically creates 3 threads, then tries to read 3 .wav files and write them as 3 .caf files. I poked around in the documentation and found the following in the docs for ExtAudioFileRead() "This function works only on a single thread. If you want your application to read an audio file on multiple threads, use Audio File Services instead." My code is not trying to read from the same ext file, it opens 3 different ones.
Is the ext audio file API just not thread safe on the iPhone? If I switch to using the regular audio file API, will it be thread safe for this kind of read/write from 3 threads usage?
thanks much
Mo DeJong
_______________________________________________
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