Re: Built-in audio hardware question
Re: Built-in audio hardware question
- Subject: Re: Built-in audio hardware question
- From: "tahome izwah" <email@hidden>
- Date: Mon, 19 May 2008 22:26:14 +0200
Thank you, that was exactly what I was looking for!
--th
2008/5/19 Jeff Moore <email@hidden>:
> Actually, please don't parse the contents of the device UID or model UID
> string. As the headerdoc for kAudioDevicePropertyDeviceUID says: "The
> content of the UID string is a black box". While it is true that the UID for
> the built-in hardware for a lot of our hardware, it is definitely not true
> for all of our hardware now and there's no guarantees about what it will be
> in the future.
>
> That said, the most reliable way to determine whether the given device ID
> you have is for a built-in device or not is to use the property,
> kAudioDevicePropertyTransportType. The built-in devices will have
> kIOAudioDeviceTransportTypeBuiltIn as the value for this property.
>
> On May 19, 2008, at 4:10 AM, Mikael Hakman wrote:
>
>> On Sunday, May 18, 2008 8:44 AM, tahome izwah wrote:
>>
>>> is there any way to uniquely identify and select the built-in hardware
>>> as an audio device? I am not talking about the *default* device (the
>>> one selected in the Sound control panel) - I am specifically looking
>>> for a way to select the *built-in* device no matter what device is set
>>> in the Sound prefs.
>>>
>>> Selecting the device by name obviously doesn't work on all systems due
>>> to localization. What would be the best way to do this?
>>
>> I'm assuming that you ask how to find, in your program code, device id
>> corresponding to the built-in hardware, in language (localization)
>> independent way. I get list of all device ids. Then in a loop I ask each
>> device for its model UID and compare this to the model UID I want to use
>> (which I read from a configuration plist). In my MBP and iMac, the built-in
>> output device model UID is "AppleHDA". You could also use model instance UID
>> which would be "AppleHDA:0" in this case. I don't know whether this model
>> UID is the same in MB, and in the other, older, or future Mac computers.
>
>
>
> --
>
> 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
>
_______________________________________________
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