Difference in behavior between 10.5 and 10.6 in Logic
Difference in behavior between 10.5 and 10.6 in Logic
- Subject: Difference in behavior between 10.5 and 10.6 in Logic
- From: B.J.Buchalter <email@hidden>
- Date: Sat, 19 Dec 2009 02:11:56 -0500
Hey CoreAudio folks,
I am seeing an odd difference in behavior between 10.5 and 10.6 in Logic with respect to my driver and I am wondering if there is anything I can do in our driver to work around this behavior in 10.6, or if this is simply a bug in 10.6 that needs fixing. It definitely is occurring in 10.6.2 with Logic 9.
I have examined the open source code for IOAudioFamily for both 10.5.8 and 10.6.2 and I don't see any changes that could could cause the issue. I am wondering if it is possible that it is in the HAL (not in open source).
So here is the problem:
When the Sample Rate of the driver is changed, the reported latencies are also changed. This happens in my IOAudioEngine::performFormatChange method. Pseudo code is:
if (changeSampleRate) {
beginConfigurationChange();
SetHardwareSampleRate(newSampleRate);
setSampleOffset(newSampleOffset);
setInputSampleLatency(newInputLatency);
setOutputSampleLatency(newOutputLatency);
completeConfigurationChange();
}
In my case, both the SampleOffset and the OutputLatency are changing. In the sequence below, both of those changes appear to be ignored in step #3.
I have a Logic 9 session with my device as the audio device; the session has an I/O plug inserted and I have the audio looped back.
My test is as follows:
1) With the sample rate at 96k, I ping the latency using the I/O plug and I get back the expected result.
2) I switch the sample rate of the session via Project Settings:Audio:Sample Rate to 192k
3) I click ping in the I/O plug, and the reported latency in the I/O shifts by the change in the latency reported by the driver (e.g. the change in reported latency is being ignored by Logic/HAL and not compensated)
4) I hit play in Logic and then hit stop.
5) I click ping in the I/O plug, and the reported latency goes back the expected result (now Logic/HAL has picked up the change in latency reported by the driver).
If I do the same sequence of steps on 10.5, in step #3, the reported latency is correct (e.g. Logic/HAL has picks up the change in latency reported by the driver). So this is definitely an regression from 10.5 to 10.6. It almost seems like the HAL is not noticing the change in those properties and is not sending out a notification to the CA clients.
If I point HAL Lab at the device while I am doing the steps above, the changes in the latency are immediately reported under 10.5. They are also immediately reported in 10.6, so maybe it is not that they are not being reported, but perhaps the timing of the reporting has changed in such a way that Logic is not capturing the change under 10.6.
In reality, this issue is simply annoying -- once the user has hit play, it all works properly. But the problem is that if the user switches between projects at different sample rate and then pings an I/O plug to compensate for an external process loop, then the latency will be wrong and it is possible for the user to get (very) confused.
Any suggestions about how to resolve this would be appreciated, even if the answer is to file a Radar.
Thanks.
B.J. Buchalter
_______________________________________________
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