Re: Attaching audio driver to another driver.
Re: Attaching audio driver to another driver.
- Subject: Re: Attaching audio driver to another driver.
- From: email@hidden
- Date: Mon, 25 Jun 2001 09:49:27 -0700
Hi Roger,
This is my plan. However, what do I do about the parameter that the start
routine takes? IOService *provider? Do I just pass in the one the modem
gets, or NULL? I notice the audio device uses it to call the super::init
(). Or can I skip that too?
Thanks,
James
Roger Smith
<irieblue@mac To: email@hidden
.com> cc: email@hidden
Subject: Re: Attaching audio driver to another driver.
06/23/01
11:17 AM
James,
Since drivers in IOKit do not support multiple inheritance,
you just need to add your IOAudioDevice subclass as part of your
Driver structure. e.g if you are writing a modem driver, your
structure will now look like:
class MyUSBModem : public IOSerialDriverSync
{
OSDeclareDefaultStructors( MyUSBModem ) ; /*
Constructor & Destructor stuff */
private:
// your private stuff
public:
//Your public stuff..
myIOAudioDevice *myIOAudioDeviceSubClass; // Where
this is
you subclass of IOAudioDevice
/* IOKit methods: */
/**** IOSerialDriverSync Abstract method implementation
****/
};/* end class MyUSBModem */
In your MYUSB
Modem::start routine, you would simply allocate your
myIOAudioDevice and proceed as normal.
You will probably need to call the appropriate initializers on your
myIOAudioDevice object explicitly i.e:
myIOAudioDevice->init()
myIOAudioDevice->attach ()
myIOAudioDevice->start ()
Roger
>
_______________________________________________
>
coreaudio-api mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
--
Roger Smith 408-974-8122
Apple Computer, Inc. email@hidden
6 infinite Loop
MS 306-2HN