• 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
Setting the HostCallback Property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting the HostCallback Property


  • Subject: Setting the HostCallback Property
  • From: William Stewart <email@hidden>
  • Date: Tue, 11 May 2004 17:18:40 -0700

I thought it might be useful to describe how to set this property in a
compatible manner so that older AU's do not break as we extend this
property. Thanks to Seb, we've tested this with a couple of older AU's
and it seems to be resilient and will also provide support for the new
HostTransport callback if the AU implements it.

OSStatus InstallValidHC ()
{
HostCallbackInfo cbInfo;
memset (&cbInfo, 0, sizeof(cbInfo));

UInt32 size = sizeof(cbInfo);
mAU.GetPropertyInfo (kAudioUnitProperty_HostCallbacks,
kAudioUnitScope_Global, 0, &size, NULL);

if (size > sizeof(cbInfo)) size = sizeof(cbInfo);

cbInfo.beatAndTempoProc = MY_HostCallback_GetBeatAndTempo;
cbInfo.musicalTimeLocationProc =
MY_HostCallback_GetMusicalTimeLocation;
cbInfo.transportStateProc = MY_HostCallback_GetTransportState;

return mAU.SetProperty (kAudioUnitProperty_HostCallbacks,
kAudioUnitScope_Global, 0,
&cbInfo, size);
}

(in this example mAU is an instance of CAAudioUnit)

HTH

Bill

--
mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement
I said, I've Got A Big Stick [OU]
Inappropiate Response [OU]
Far Over The Borders Of Insanity And Still Accelerating [Eccentric]
________________________________________________________________________
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Getting the spacial position of speakers?
  • Next by Date: Re: Setting the HostCallback Property
  • Previous by thread: Re: Getting the spacial position of speakers?
  • Next by thread: Re: Setting the HostCallback Property
  • Index(es):
    • Date
    • Thread