Audio Device Property Caching in Snow Leopard?
Audio Device Property Caching in Snow Leopard?
- Subject: Audio Device Property Caching in Snow Leopard?
- From: AI Developer <email@hidden>
- Date: Thu, 22 Oct 2009 20:47:36 +0530
Hi,
Does Snow Leopard cache audio device properties, and satisfy calls from
the cache?
I've run into a very wierd problem when trying to change the Sampling
Rate of a device on SR.
If I set the SR, and then query the SR back, I do not get the new value
- ever, as long as the application instance is running!
Here's some sample code that demonstrates the problem:
-------
err = AudioDeviceSetProperty(currentID, NULL,
0, 0,
kAudioDevicePropertyNominalSampleRate, propSize, &srToSet);
if (err == kAudioHardwareNoError)
{
Float64 currentSR = 0.0;
propSize = sizeof (currentSR);
err = AudioDeviceGetProperty(currentID, 0, 0,
kAudioDevicePropertyNominalSampleRate, &propSize, ¤tSR);
if (err == kAudioHardwareNoError)
{
std::cout << "\tResultant Nominal Sampling Rate: "
<< (int)currentSR << " Hz.";
}
}
-------
If srToSet is differet from the current rate, and I execute this code,
the value coming out of the GetProperty is not as expected.
Note that at the same time, the SR has been changed properly (Audio
MIDI Setup shows the new value as soon as the SetProperty succeeds).
It's just that the process that has invoked the SetProperty shows the
wrong value.
This only happens on 10.6, not on 10.5.
Am I doing something wrong here?
Thanks.
Devendra.
|
_______________________________________________
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