Re: Help!
Re: Help!
- Subject: Re: Help!
- From: Jeff Moore <email@hidden>
- Date: Wed, 24 Apr 2002 12:51:34 -0700
on 4/23/02 11:56 PM, Matthew Johnson <email@hidden> wrote:
>
The following section of code works with the built-in audio controller
>
>
count = sizeof(brc->inDeviceFormat);
>
>
err = AudioDeviceGetProperty(brc->inputAudioDevice, 0, false,
>
kAudioDevicePropertyStreamFormat, &count,
>
&brc->inDeviceFormat);
<rest of code snipped>
>
This is great but when I plug in a plantronic DSP-400 USB microphone then I
>
get
>
>
get kAudioDevicePropertyStreamFormat error 185279702
So your problem is in how you are calling AudioDeviceGetProperty. You seem
to always pass in false for the "isInput" argument. Consequently, when you
are talking the built in hardware, you get a response since it has an output
section. But, when you are talking to the USB Microphone, you get an error
because it doesn't have an output section.
You have to pass true in the "isInput" argument for a device property if you
want to ask about the properties of the input section of a device.
>
This bit of code to get the controller names makes the following output:
>
>
# of controllers=3
>
name of Controller[0]=[Plantronics headset]
>
name of Controller[1]=[Plantronics headset]
>
name of Controller[2]=[Built-in audio controller]
>
>
why is it doing that when I only have one plantronics headset plugged in?
The reason why is that USB devices don't present their input and output data
synchronously. They have to be clocked differently so they show up as
separate devices in the HAL.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
- Follow-Ups:
- Re: Help!
- From: Matthew Johnson <email@hidden>
References: | |
| >Help! (From: Matthew Johnson <email@hidden>) |