Re: what is the equivalent to VSTi in AU world ?
Re: what is the equivalent to VSTi in AU world ?
- Subject: Re: what is the equivalent to VSTi in AU world ?
- From: Urs Heckmann <email@hidden>
- Date: Tue, 24 Dec 2002 10:45:01 +0100
Hi friends,
looking at AUEffectBase's implementation of GetSampleRate, it looks
like this:
Float64 AUEffectBase::GetSampleRate()
{
return GetOutput(0)->GetStreamFormat().mSampleRate;
}
Err, this is just too easy to even worry about. Just copy/paste this to
your MusicDeviceBase or the MusicDevice you derive from that...
And as Airy said, some things in MusicDeviceBase are different, because
such devices like the DLS Synth provide non-MIDI-APIs for applications
like games etc. (You have HandleNoteON() from MIDIBase vs. StartNote()
etc.)
Merry X-mas,
;) Urs
Am Dienstag, 24.12.02, um 02:10 Uhr (Europe/Berlin) schrieb Marc
Poirier:
somehow it looks strange that it is not the same way as for
fx plug-ins, of course, any unit which is processing some signals
need to
know the rate ...
but prolly somebody once thought that having an audio
input in a synth or sampler is more the exception .. it could also be
that somebody tried to make it as complicated as in VST 2.xx where you
have to make an extra input plugin if you have a synth with audio
inputs ...
Well, input or no input, pretty much any synth needs to know the sample
rate. But anyway, I think that some folks are mixing up the AU API
and AU
SDK. AUBase, AUEffectBase, MusicDeviceBase, MidiEffectBase, etc.,
none of
those are part of the AU API. The API is just an extended list of
Component Manager selectors that these particular component types
support.
AUBase and all of them are part of the AU SDK, which was written to
make
it easier for people to write Audio Units. Having to deal with raw
Component Manager requests to implement an effect is pretty unpleasant.
AUBase etc. are classes that dispatch these requests and "glue "them to
methods in the AUBase, AUEffectBase, etc. classes. Those classes are a
convenience for us folks who write AUs, and also serve to demonstrate
how
do implement a lot of the aspects correctly.
So where am I going with this... Well, I'm just saying that because
MusicDeviceBase doesn't have a GetSampleRate method (yet) doesn't mean
that sampling rates aren't supported in MusicDevices or that they are
considered trivial or exotic or anything. These base classes are
things
(so far as I can tell) that the CoreAudio folks are continually
expanding
to provide more convenience and instant functionality for us, but I
guess
writing a MusicDeviceBase::GetSampleRate method isn't something that
they've gotten around to yet. But it would be easy to write yourself,
if
you don't want to wait... :)
Marc
_______________________________________________
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.