Re: AU preset issues
Re: AU preset issues
- Subject: Re: AU preset issues
- From: Chris Reed <email@hidden>
- Date: Sat, 30 Nov 2002 11:43:58 -0600
On Saturday, November 30, 2002, at 04:05 am, Urs Heckmann wrote:
Am Samstag, 30.11.02, um 01:40 Uhr (Europe/Berlin) schrieb Chris Reed:
2. Most MusicDevices don't set the "data" key in the ClassInfo. By
"most" I mean every one I've got my hands on. (I haven't tried VSamp
yet, though.) Do MusicDevices need to handle the ClassInfo property
differently (manually) than Effects or MusicEffects? Am I not seeing
something obvious here?
I always (despite some intervention by Robert) thought that as long as
you only have usual parameters, AUBase would do the job. Now, looking
at the code, I see that it just calls element->SaveState(data),
passing the duty to the implementation. Ooops. My fault.
Well, doing exactly that works just fine for Effects and MusicEffects.
I just went trolling through the AUBase code and it looks like this
should work for MusicDevices too. MusicDeviceBase inherits from AUBase,
which has the implementation of SaveState, and AUMIDIBase.
The only thing I can see that would prevent the "data" from being
generated, or coming 0 length, would be the MusicDevice not having any
scopes or elements. That is, no scopes, or scopes by no elements. Is
that even possible if you still get sound out?
Is everyone calling CreateElements() in your MusicDevice constructor?
Hmm.. nevermind. It looks like AUBase::DoInitialize() calls
ReallocateBuffers() which calls CreateElements() for you.
Guess I'll have to do some debugging to figure this out.
This is to be handled same way for any of theses AU types: Effect
Unit, MusicEffect + MusicDevice (dunno much about the others) - The
appropriate code has been posted to this list by Art some time ago.
Search for saveState()...
This should definately be mentioned in the guidelines, since it isn't
in the example code...
The code that Art posted was only for adding *extra* data to the
ClassInfo dictionary. If all you're AU cares about is the parameters,
you shouldn't have to do anything. It's only if you need state
information above and beyond the parameters that you have to override
SaveState().
Cheers
-chris
_______________________________________________
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.