Re: Using CoreAudio from a kext
Re: Using CoreAudio from a kext
- Subject: Re: Using CoreAudio from a kext
- From: "Edward J. Sabol" <email@hidden>
- Date: Tue, 14 Aug 2001 11:05:08 -0400 (EDT)
>
Ok, I can understand that. Basically what I am looking to do is try to
>
write an interface so that *nix applications written using OSS (and/or ALSA)
>
will work with CoreAudio. Both OSS and ALSA use /dev character devices to
>
access the audio hardware.
/dev/audio would be a cool addition to Darwin.
>
So what I need is some way to access CoreAudio from a character device.
>
Since it is impossible to access CoreAudio from a kext, is it possible to
>
set up a devfs character device from userland?
I don't know the answer either, but I tend to doubt it. You might want to try
asking this question on the darwin-development mailing list. There are more
people familiar with kext and IOKit development over there.
I would think that the more likely scenario is that you have a kext which
implements the /dev/audio device and starts up a userland daemon process,
which then communicates with the kext via IOUserClient, and this userland
process would make the CoreAudio calls. (Having never done anything like
this, I have no idea if this will work or not.)
You can start a userland process from a kext with KUNCExecute():
KUNCExecute("/path/to/your/bundle/Resources/devaudiod",
kOpenApplicationPath, kOpenAppAsRoot);
Refer to the header:
/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/UserNotification/KUNCUserNotification.h
Hope this helps,
Ed