Re: AU Host Sample?
Re: AU Host Sample?
- Subject: Re: AU Host Sample?
- From: William Stewart <email@hidden>
- Date: Mon, 24 May 2004 11:20:49 -0700
Adding to this...
There's a newer piece of code in the latest SDK called auconvert (part
of the new audio file tools) - that takes a file and will do a sample
accurate processing of a file with pretty much any type of AU
(providing of course that the AU's latency and tail properties are
correct)
Bill
On 21/05/2004, at 3:15 PM, Urs Heckmann wrote:
>
There are AU hosting examples in the SDK...
>
>
Developer/Examples/CoreAudio/Services/
>
>
It depends on what you want to do though. It's a bit more complex when
>
you don't use AUGraphs. In that case you have to update the TimeStamp
>
(important!), send raw MidiEvents, install Input Callback, send Render
>
calls (better: use FastDispatch Callbacks).
>
>
For convenience, there are a lot of neat utilities in PublicUtility
>
now, i.e. CAAudioUnit, CAComponent etc.
>
>
Basically (uhm, very basic):
>
>
Setup process:
>
>
- Find a Component (needs ComponentType, SubType, ManufacturerID )
>
- Open the Component
>
- SetProperty kAudioUnitProperty_SetRenderCallback
>
- SetProperty kAudioUnitProperty_StreamFormat on kAudioUnitScope_Input
>
and kAudioUnitScope_Output
>
- Initialize Audio Unit
>
>
Render Process:
>
>
- reset AU
>
<loop>
>
- send events, i.e. MusicDeviceMIDIEvent();
>
- Call Render (AU calls your InputCallback), increasing the host Time
>
TimeStamp each call
>
</loop>
>
>
Open GUI:
>
>
Create a WindowRef
>
Get ComponentDescription for AUViewComponent
>
OpenAComponent
>
AudioUnitCarbonViewCreate
>
Adjust window size
>
>
This should be 50-100 lines of code. (I've done this in a VST and an
>
AU that hosts another AU)
>
>
Then, to refine everything, grab parameter list, preset list, install
>
property listeners, get/set ClassInfo etc, and tie that to your host
>
application's logic.
>
>
Hope this helps for a start...
>
>
Cheers,
>
>
;) Urs
>
>
>
Am 21.05.2004 um 21:49 schrieb m:
>
>
> Hope this is the right place...I'm trying to get started on writing
>
> an app that needs to host AUs. The sample code I've found so far
>
> (synthtest <http://www.manyetas.com/creed/synthtest.html>) doesn't
>
> compile, and the compiled version crashes, so tha's an inauspicious
>
> start.
>
>
>
> The docs, while they seem thorough and acurate, merely recount facts,
>
> and don't really outline what you need to do (I'm thinking of the
>
> "Tasks" section that much of Apple's docs have).
>
>
>
> Any pointers?
>
>
>
> Thanks in advance!
>
>
>
> _murat
>
> _______________________________________________
>
> 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.
>
_______________________________________________
>
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.
>
>
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
Culture Ship Names:
Ravished By The Sheer Implausibility Of That Last Statement [GSV]
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.