• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Multiple ExtAudioFileRefs pointing to the same file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple ExtAudioFileRefs pointing to the same file


  • Subject: Re: Multiple ExtAudioFileRefs pointing to the same file
  • From: Doug Wyatt <email@hidden>
  • Date: Tue, 10 Mar 2009 14:33:49 -0700


On Mar 10, 2009, at 14:10 , Christopher Liscio wrote:

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?

How were the two ExtAudioFiles created? Are they both "wrapping" the same AudioFile which you opened first? Or were they opened independently?


Doug

_______________________________________________
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


  • Follow-Ups:
    • Re: Multiple ExtAudioFileRefs pointing to the same file
      • From: Christopher Liscio <email@hidden>
References: 
 >Multiple ExtAudioFileRefs pointing to the same file (From: Christopher Liscio <email@hidden>)

  • Prev by Date: Multiple ExtAudioFileRefs pointing to the same file
  • Next by Date: Re: Multiple ExtAudioFileRefs pointing to the same file
  • Previous by thread: Multiple ExtAudioFileRefs pointing to the same file
  • Next by thread: Re: Multiple ExtAudioFileRefs pointing to the same file
  • Index(es):
    • Date
    • Thread