Re: AudioDeviceAddPropertyListener & custom controls
Re: AudioDeviceAddPropertyListener & custom controls
- Subject: Re: AudioDeviceAddPropertyListener & custom controls
- From: Jeff Moore <email@hidden>
- Date: Thu, 8 Jun 2006 14:27:47 -0700
On Jun 8, 2006, at 1:54 PM, david tay wrote:
Jeff,
Would I be correct in rephrasing - that for custom subclasses of
IOAudioLevelControl or IOAudioToggleControl, the properties should
cover whatever the base class has?
Indeed.
What about a custom subclass of IOAudioControl? ie - a direct
subclass of IOAudioControl?
ie -
class MyCustomControl: public IOAudioControl {
}
What would one have to do? Or should every custom control be a
descendent of either IOAudioLevelControl or IOAudioToggleControl?
Ah. There are no standard controls that are naked subclasses of
IOAudioControl. They are all subclasses of one of the three main
classes. So, you can do whatever suits your purpose. You can do as
many or as few properties as you need to express the functionality of
the control.
On Jun 8, 2006, at 11:05 AM, email@hidden
wrote:
Date: Wed, 7 Jun 2006 17:05:15 -0700
From: Jeff Moore <email@hidden>
Subject: Re: AudioDeviceAddPropertyListener & custom controls
To: CoreAudio API <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Your HAL plug-in has to translate the IOAudioControl into a set of
properties that can be queried through the HAL's API. Once you do
that, clients listen for the changes to the control just like they
would for volume or mute.
In general, I'd advise you to implement the a similar set of
properties as what the HAL provides for a control that behaves more
or less the same. For instance, if you are implementing properties
for a custom IOAudioLevelControl subclass, you should implement
properties that cover the scalar and dB values, the dB range, and
converting between dB and scalar.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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