Re: SampleHardwareDriver bug?
Re: SampleHardwareDriver bug?
- Subject: Re: SampleHardwareDriver bug?
- From: Jeff Moore <email@hidden>
- Date: Tue, 06 Jan 2009 12:26:31 -0800
Since an AudioDevice is required to have only a single sample rate, it
doesn't matter what scope kAudioDevicePropertyNominalSampleRate is
asked for in they should all return the same value.
The code in the HPBase classes takes an expansive view of the scope
passed in for a property query so that it can do it's best to always
satisfy the request. So one pattern you'll find in the HPBase classes
is that for global scope properties, the scope won't ever actually get
checked and the same value is always returned.
So no, I would not view this situation as a bug. There is likely
something else causing your problems with changing sample rates.
On Dec 18, 2008, at 5:43 AM, Mike Kluev wrote:
My HAL plugin is based on SampleHardwareDriver sample code. It has
more
than one sample rate, and while the rates are shown in HALLab and AMS,
I can't change them. I traced it down to the following:
When my client app calls
AudioDeviceGetProperty(device, channel, isInput,
kAudioDevicePropertyNominalSampleRate ...)
the channel parameter is getting translated into the the
AudioObjectPropertyAddress's
inAddress.mElement and the isInput parameter is getting translated
into the
inAddress.mScope ('inpt' or 'outp') inside SampleHardwareDriver
plugin.
However, the SampleHardwareDriver's
HP_DeviceFormatList::GetPropertyData
completely ignores mScope (it has logic that tries input first, then
output).
Also, HP_DeviceFormatList::SetPropertyData completely ignores the
scope
(it has different logic in its kAudioDevicePropertyNominalSampleRate
handler
that not only ignores the scope but is completely incompatible with
the
GetPropertyData logic).
Is that not a bug in SampleHardwareDriver?
--
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