Re: Getting Bit Depths from Default Audio Object
Re: Getting Bit Depths from Default Audio Object
- Subject: Re: Getting Bit Depths from Default Audio Object
- From: "René J.V. Bertin" <email@hidden>
- Date: Thu, 18 Oct 2012 16:56:15 +0200
If I'm not mistaken, Audio Midi Setup works on audio devices, not objects?
I'd be very much interested in knowing if one can *set* the bitdepth, as with AMS?
René
On Oct 18, 2012, at 16:28, Tim Murison wrote:
> You need to iterate through the physical formats of the device's streams.
>
> On 2012-10-18, at 3:03 AM, email@hidden wrote:
>
>> I am looking for a way to get a list of available bit depths of an audio object like what can be seen in the Apple Audio Midi Setup application. I assumed it would be similar to getting available nominal sample rates from the HAL like below but I can't seem to find a way to do it. Any help would be appreciated.
>>
>> UInt32 size = sizeof(AudioValueRange);
>> AudioObjectPropertyAddress propertyAddress;
>> propertyAddress.mSelector = kAudioDevicePropertyAvailableNominalSampleRates;
>> propertyAddress.mElement = kAudioObjectPropertyElementMaster;
>> propertyAddress.mScope = kAudioObjectPropertyScopeOutput;
>>
>> AudioObjectGetPropertyDataSize(DeviceId, &propertyAddress, 0, NULL, &size);
>>
>> int rateCount = (size / sizeof(AudioValueRange));
>> AudioValueRange *range = new AudioValueRange[rateCount];
>>
>> AudioObjectGetPropertyData(DeviceId, &propertyAddress, 0, NULL, &size, range));
_______________________________________________
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