• 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: Race condition in aggregate device?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Race condition in aggregate device?


  • Subject: Re: Race condition in aggregate device?
  • From: "Christoph Teschner" <email@hidden>
  • Date: Wed, 24 May 2006 22:09:53 +0200

what really leaves me puzzled is the fact that this is sometimes working and sometimes isn't.
anyway, I've assembled the relevant parts of my code in a file that I'll send to you.


thanks,
Christoph

From: Jeff Moore <email@hidden>
To: CoreAudio API <email@hidden>
Subject: Re: Race condition in aggregate device?
Date: Wed, 24 May 2006 12:31:11 -0700

Without actually seeing code, it's hard to say what might be going on. The usual cause for this is that your IOProc didn't actually get registered or started like you expected for some reason. The usual cause for this is that you are using the wrong AudioDeviceID or something like that when you make an API call.

At any rate, I guess I'd go through your code with a fine toothed comb and make sure that all your assumptions are actually true at each step in the process. If you have any hard-coded values for anything that you can get from the HAL, I'd be suspicious of them.

You might also want to look at the device's telemetry with HALLab to make sure that it is actually running. In fact, you might just want to sample the process when it is supposed to be playing audio, just to be sure there aren't any hung threads anywhere.

On May 24, 2006, at 12:24 PM, Christoph Teschner wrote:

the aggregate device is always showing up in the device list and it is never missing sub-devices.
however, it appears that in 40% of all my test cases (without any modifications to my code) it is failing to call IOProcs . in any case, the created aggregate is functional. because I can use it in other apps like aulab and in subsequent launches of my own app and it's never failing to call IOProcs.
hope you can help.


thanks,
Christoph


From: Jeff Moore <email@hidden>
To: CoreAudio API <email@hidden>
Subject: Re: Race condition in aggregate device?
Date: Wed, 24 May 2006 11:49:53 -0700

You need to define what you mean by the aggregate device not working. Is it not showing up in the device list? Is it missing sub-devices? Is it failing to call IOProcs?

Please be as specific as you can be.

On May 24, 2006, at 11:45 AM, Christoph Teschner wrote:

I'm successfully creating an aggregate device that consists of the built-in and a the M-Audio FireWire 410 Multichannel.
I'm not getting any error messages and it appears just as expected in AMS.
I'm programmatically creating the aggregate device upon application launch. now, when I try to use this
the newly created device, it only works in about 40% of all cases, from which I assume that there might be an internal race condition
when creating the aggregate device. if in subsequent app launches I try to use the exact same device it always works without any problems.
I've tried any possible combination of inserting usleep()s in the creation of my aggregate device and in the setup of the AUGraph.
but the behavior still appears random to me, in the sense that sometimes I can use the created device right away and sometimes
no audio data is being processed (unless I use the device in subsequent app launches).
any help would be greaty appreciated.


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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


_______________________________________________
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


References: 
 >Re: Race condition in aggregate device? (From: Jeff Moore <email@hidden>)

  • Prev by Date: Re: Race condition in aggregate device?
  • Next by Date: Re: Race condition in aggregate device?
  • Previous by thread: Re: Race condition in aggregate device?
  • Next by thread: Re: Race condition in aggregate device?
  • Index(es):
    • Date
    • Thread