Re: Regarding 'VU meter' object
Re: Regarding 'VU meter' object
- Subject: Re: Regarding 'VU meter' object
- From: Urs Heckmann <email@hidden>
- Date: Fri, 28 Jan 2005 02:28:13 +0100
Hiya Lance,
I'm sure you can copy/paste the stuff from the example VU meter to any
older version of the sdk. (And any newer version should still produce
AUs capable of running under 10.2.3 - despite the fact that an annoying
bug in Carbon doesn't allow you to dispose off your own CustomControl
definitions in versions prior to 10.2.4)
Generally, designing a VU meter is as simple as this:
- create a read-only parameter that - upon read out - will retrieve the
volume-whatever-state (i.e. derive from AUBase::GetParameter())
- in your view, set up a CFRunLoopTimer (MUST run in the main thread,
which these normally do when created upon AUCarbonViewBase::CreateUI()
-> if you draw i.e. in the audio- or midi thread, you'll occasionally,
but certainly experience crashes)
- create a control object (doesn't have to be a full blown Carbon
Control, because no user interaction is required) that reads
aforementioned parameter upon timer calls and draws the to-be-displayed
graphics according to current value
You do not need to install parameter listeners or anything for the VU
parameter, as you only want to read it while the gui is open. This is
done during timer calls.
Should be pretty easy; I think the sample code in GenericView mostly
reflects this...
Hope this helps,
;) Urs
Am 28.01.2005 um 01:17 schrieb Lance Drake:
Well - this always happens - I send a note to the list, keep digging
in the meanwhile and come up with new info.
The 'Audio Units Effects Template' sample code - released in Dec 2004
- actually HAS a VU meter object. However, it appears that it
requires a later version of the CoreAudio Framework than 'CoreAudio
2.1.2'. Is this not correct? The project errs out during the build
with a missing reference: 'struct HostCallbackInfo' has no member
named 'transportStateProc'.
The ReadMe file makes no mention of requirements - so I am guessing
this is the case. Since I have to support MacOSX 10.2.3, it appears I
really will have to roll my own - but it IS cool that the CoreAudio
team keeps coming up with more and more really useful goodies - as is
the recently released 'Template' package.
Thanks,
Lance Drake
_______________________________________________
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