Re: getting started with CoreAudio plugin for Final Cut Pro
Re: getting started with CoreAudio plugin for Final Cut Pro
- Subject: Re: getting started with CoreAudio plugin for Final Cut Pro
- From: Jeff Moore <email@hidden>
- Date: Tue, 23 Nov 2004 15:46:24 -0800
The two binaries can communicate with each other but, they are still
two separate binaries. So, you will have to structure them in such a
way that they can communicate with each other. There are a variety of
ways to do this, but the easiest is probably to just have your code
live in a central shared library that the component bundle and
user-land driver bundle both link against and use to access your
hardware.
Other ways to do this include using dynamic method look ups via
CFBundle or dyld, have both plug-ins rendezvous on shared memory, etc.
Most other ways are probably much more cumbersome to implement than
just having a shared library.
On Nov 23, 2004, at 3:29 PM, Tommy Schell wrote:
Kelly,
Thanks very much for replying..
So if my Quicktime component/Firewire thread and CoreAudio plugin are
both loaded into Final Cut Pro's process space, that means that
they can use each other's services directly, ie call each other's
functions? And access each other's variables?
Do I need to include each other's headers or, for example, use
FindNextComponent and OpenAComponent in order for plug-ins/components
within the same process to rendezvous?
Tommy
On Nov 23, 2004, at 2:17 PM, kelly jacklin wrote:
On Nov 23, 2004, at 1:01 PM, Tommy Schell wrote:
I have been told that I need to write a CoreAudio plugin that works
with the Audio HAL as an input and output to accomplish this task.
This is correct. I'll let someone on the CoreAudio team point you in
the right direction for any sample code, but you need to write either
an IOAudio device driver (i.e. kernel audio driver) or a HAL plug-in
(user-level audio driver) if you want to appear as an audio device to
Final Cut Pro, since it uses the CoreAudio device abstraction for
playback.
For capture (i.e. input) Final Cut Pro uses QuickTime, and while you
could currently get away with a sinp component, you would be
ill-advised to do so, since vending your device through CoreAudio
will get you compatibility, as well as future-proofing should a
future version of QuickTime use CoreAudio directly...
Is it possible to handle the audio as a thread within Quicktime
components, or does a plugin need to be a separate process located
in the plugins folder?
Plug-ins are not separate processes... Plug-ins are a code packaging
mechanism that allows your code to be discovered and loaded within a
host process. In this manner, a CoreAudio HAL plug-in is very
similar to a QuickTime component, in that it is _not_ global to the
system, it is instantiated within the host process.
Just write a proper IOAudio driver or HAL plug-in (your choice), and
you will show up as an audio interface to Final Cut Pro.
If a CoreAudio plugin needs to be a separate process, how do my
Quicktime components or Firewire threads communicate with and pass
data to and from the plugin?
It doesn't, and you shouldn't. Daemon processes and IPC is not the
right way to write a user-level audio device driver. Again, as a HAL
plug-in, you will be loaded within the host application's process
space (Final Cut Pro, in this case) and will run within that context.
Because your Quicktime components and Firewire threads are also in
this same process, you have many choices of how to share state and
rendezvous between these plug-ins/components.
Or, if you choose to write your driver as an IOAudio driver, you will
be hosted within the kernel, and can expose buffers into the user
client's address spaces as appropriate.
kelly jacklin
pro apps - final cut pro
apple computer, inc.
_______________________________________________
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
--
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