Multiple ExtAudioFileRefs pointing to the same file
Multiple ExtAudioFileRefs pointing to the same file
- Subject: Multiple ExtAudioFileRefs pointing to the same file
- From: Christopher Liscio <email@hidden>
- Date: Tue, 10 Mar 2009 17:10:01 -0400
I am working with a desktop application on Mac OS X 10.5(.6) that
creates two ExtAudioFileRef instances, in two separate threads. Both
of the instances point to the same file on disk. The main thread's
instance is used for audio playback, and the auxiliary thread reads
the file in its entirety for drawing purposes.
Everything seems to behave OK, except for my call to
ExtAudioFileGetProperty( ...
kExtAudioFileProperty_FileLengthFrames ... ). In the main thread,
this function always returns the correct value of ~8 million frames
for a particular file. Sometimes, in the second thread,
kExtAudioFileProperty_FileLengthFrames comes back as ~150 million for
the same file.
When the second thread is done reading the file, it correctly stops
after only ~8 million frames. So, the issue appears to be localized
to reading the FileLengthFrames property.
This error is not easily reproducible, either. It only happens when
reading M4A files, and only about 10% of the time. It doesn't appear
to be specific to any one file, either.
Is it fair to say that >1 ExtAudioFileRef pointing to the same file on
disk is not supported, and should be considered unsafe? Or, is this a
bug in ExtAudioFile that I should file?
Thanks in advance,
Chris Liscio
http://SuperMegaUltraGroovy.com
Acoustic measurement software for Mac OS X -- http://www.FuzzMeasure.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