• 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: ExtAudioFile threading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFile threading


  • Subject: Re: ExtAudioFile threading
  • From: Dominic Feira <email@hidden>
  • Date: Wed, 3 Jun 2009 20:12:28 -0400

Just wanted to follow this up so somebody doesn't make the same mistake that I did.  I was mysteriously getting 'nope' from ExtAudioFileRead which is kAudioFileStreamError_IllegalOperation.

It turns out I was accidentally overwriting the file that I was reading audio from.  Oops.  Hopefully this message will serve as reference for someone who encounters the same error.

P.S.  Is there going to be a kicking Core Audio party at WWDC this year?  :)

Dominic Feira / Code Monkey / Ambrosia Software, Inc. -- http://www.AmbrosiaSW.com

On Jun 3, 2009, at 5:20 PM, Doug Wyatt wrote:


On Jun 3, 2009, at 14:15 , Dominic Feira wrote:

I'd just like some quick clarification on the multi-thread limitations of ExtAudioFile.  I realize that I shouldn't call ExtAudioFileRead concurrently on multiple threads.  However...

1.  Is it safe to create the ExtAudioFile on thread A, but then later read from thread B?

yes

2.  Is it safe to use ExtAudioFileSeek on thread A, but then later read form thread B?

yes

3.  Is it safe to call ExtAudioFileRead on thread A and later ExtAudioFileRead on thread B as long as thread A and B aren't concurrent?

yes

Or should *all* access to the ExtAudioFile, including opening, be on one thread?  If I later need to access from another thread, should I open another ExtAudioFile?

only if you can't guarantee that the two threads won't simultaneously try to access the same ExtAudioFileRef; your original understanding is all there is to it.

I'm running into some weird issues and I want to make sure that the threading is handled correctly.




 _______________________________________________
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: ExtAudioFile threading
      • From: William Stewart <email@hidden>
References: 
 >ExtAudioFile threading (From: Dominic Feira <email@hidden>)
 >Re: ExtAudioFile threading (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: AU Lab doesn't let me choose an audio input device
  • Next by Date: Re: ExtAudioFile threading
  • Previous by thread: Re: ExtAudioFile threading
  • Next by thread: Re: ExtAudioFile threading
  • Index(es):
    • Date
    • Thread