Recognizing iSight as audio input device?
Recognizing iSight as audio input device?
- Subject: Recognizing iSight as audio input device?
- From: Stephen Shaw <email@hidden>
- Date: Thu, 23 Feb 2006 16:40:14 -0800
- Thread-topic: Recognizing iSight as audio input device?
Is there a trick to recognizing the iSight as an audio input device?
Currently I recognize which ever is set as default in the control panel
(line in, digital in, usb microphone), but if I try and iSight, my
application fails to recognize it.
Currently I use the ComplexPlayThru method of detection
{
//There are several different types of Audio Units.
//Some audio units serve as Outputs, Mixers, or DSP
//units. See AUComponent.h for listing
desc.componentType = kAudioUnitType_Output;
//Every Component has a subType, which will give a clearer picture
//of what this components function will be.
desc.componentSubType = kAudioUnitSubType_HALOutput;
//all Audio Units in AUComponent.h must use
//"kAudioUnitManufacturer_Apple" as the Manufacturer
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
//Finds a component that meets the desc spec's
comp = ::FindNextComponent (NULL, &desc);
if (comp == NULL)
exit (-1);
//gains access to the services provided by the component
::OpenAComponent (comp, &mInputUnit);
err = EnableInputIO ();
checkErr(err);
// SetInputDeviceAsCurrent may only be called AFTER enableIO has
occurred
err= SetInputDeviceAsCurrent (in);
}
Thanks
Stephen
_______________________________________________
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