Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sound Input Component



Hello Nidhi,

You should not write a sound input component at this point, since its interface is limited to the very old Sound Manager capabilities (sample rates < 65 kHz, no greater than 2 channels, native 16-bit integer samples instead of CoreAudio's higher precision 32-bit Float samples).

If the device you want to capture audio from does not have a CoreAudio driver (kernel extension if you wish to make it available across all processes, or as a HAL plugin in user space if you just want to support single process IO). It's unclear to me from your e-mail whether the device in question already has a CoreAudio driver or not (what is the device?). If an audio device has a CoreAudio driver, it can be used from applications that use the CoreAudio api's, or from apps that use the Sound Manager/Sound Input Component API's, since the Sound Input Component API's are a vestige of older Mac OS'es, and have been implemented in OS X as sitting atop CoreAudio anyway.

Kelly Jacklin, another engineer here at Apple, answered a similar question on the coreaudio mailing list about a month ago. Here's what he said:

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.


Hope that helps.

-Brad Ford
QuickTime Engineering




On Dec 22, 2004, at 1:37 AM, Nidhi Chadha wrote:

Hi All ,

What are functions performed by the sound input component in mac X  ?  I am getting MPEG4 data stream from the digital camcorder thru USB port .I am writing VDig component for the video data . What should I do for playing audio captured from the camcorder ? The audio driver is already available in mac X . Do I need to write sound input component for my camcorder ?

 Pls suggest

Thanks and regards

Nidhi
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden
References: 
 >Sound Input Component (From: Nidhi Chadha <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.