Re: implementing an AudioHardwarePlugin
Re: implementing an AudioHardwarePlugin
- Subject: Re: implementing an AudioHardwarePlugin
- From: Jeff Moore <email@hidden>
- Date: Tue, 6 Feb 2007 12:33:25 -0800
On Feb 6, 2007, at 6:59 AM, Michael Dautermann wrote:
Hi all,
I've been working on a 'vdig' for a video digitizing device for a
few months and now my work is pulling me into the world of CoreAudio
(to do the audio component related to my device). I have spent a
day looking through the Core Audio Framework Reference pages on
developer.apple.com, and a few hours looking through this list's
archives, and I am very impressed at the amount of work people are
getting done with CoreAudio (especially when some documentation is
pretty thorough but some other parts and examples are seriously
lacking).
I have to do a AudioHardwarePlugin. The reason this
AudioHardwarePlugin needs to run in user-land is because my audio
data will come from a daemon which will be serving up my audio data
via sockets. Yeah, it's disgusting, but it appears to be the only
way to properly share a USB device which has one USB interface with
multiple bulk endpoints. Doing a solution that mixes user-land (the
'vdig' run in userspace) and kernel mode (i.e. IOAudio) while doing
USB seems out of the question.
Here are my hopefully easy questions:
1)
My video component goes into ~/Library/Quicktime (probably also /
Library/Quicktime), but where does a AudioHardwarePlugin go? In
one list posting from 2003, Stefan Werner guessed /Library/Audio/
Plug-Ins/HAL (so if this were the place, could I also install in ~/
Library/Audio/Plug-Ins/HAL)?
Only /Library/Audio/Plug-Ins/HAL is searched by the HAL for plug-ins.
2)
I created a CFPlugin project in XCode, gave the bundle a name ending
in ".plugin", a unique UUID into the Info.plist file for my factory
function and the kAudioHardwarePlugInInterface3ID UUID for the
CFPlugInType. After putting my new bundle into ~/Library/Audio/Plug-
Ins/HAL (or ~/Library/Audio/Plug-Ins/Components), I did not see any
of my printfs (e.g. in my Factory function, in my QueryInterface
function) in the console when I launched HALLab. Am I using the
wrong format for the CFPlugin or the wrong testing app (just to see
if I can get the component opened/enumerated)?
Sounds like your plug-in wasn't being found by the HAL as it is in the
wrong directory.
Are AudioHardwarePlugin and HAL Plugins one and the same? or is one
class a superset of another?
The HAL supports two kinds of plug-ins. The first kind of plug-in is
the general user-land audio driver described by <CoreAudio/
AudioHardwarePlugIn.h>. This kind of plug-in is given basically full
responsibility for implementing the HAL's API semantics. Each client
API call is basically handed straight to the plug-in for implementation.
The other kind of plug-in the HAL supports is described in <CoreAudio/
AudioDriverPlugIn.h>. It is for IOAudio-based drivers in the kernel
that want to support custom properties through the HAL's API.
I'm sure it's been said before on this list, but I sure *wish* there
was a basic AudioHardwarePlugin sample project I could use.
THe request has been noted.
--
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