Hi,
We have a Cocoa app that runs neuroscience experiments. Audio stimuli are played using NSSound. The sounds are a few aiff files of 50k-200k. The stimuli are played frequently, and the application needs to run pretty much all day. In addition to the audio stimuli, there are visual stimuli presented via OpenGL on a captured second screen, and the main screen shows a variety of status windows and graphs. And it's pulling a few channels of data from an Analog-Digital Converter box.
After upgrading a dual-2.5 GHz G5 to Leopard, we're seeing dropouts like the following on it:
May 9 17:01:12 dhc017024 kernel[0]: IOAudioStream[0x34be600]::clipIfNecessary() - Error: attempting to clip to a position more than one buffer ahead of last clip position (124,3029)->(126,2651). May 9 17:01:12 dhc017024 kernel[0]: IOAudioStream[0x34be600]::clipIfNecessary() - adjusting clipped position to (125,3029)
This happens with either the internal audio, or when using a USB audio card (without a specific driver, so it might be using the same driver as the internal.)
iTunes plays without error on the same machine, even when under heavy load (visualizer). Normally, the experiment app uses 15%-25% CPU.
Adjusting volume or muting/unmuting through the keyboard seems to be something that can trigger the problem, but I'm not certain.
Is there a workaround for this? Would there be any benefit to dropping down to CoreAudio or the SystemSound API? I'd rather not dig into CoreAudio and find that it doesn't fix the problem.
I noticed the ADC Q&A QA1467, "Apple also provides the HALLab utility (/Developer/Examples/CoreAudio/HAL/HALLab). You can use this application to monitor the statistics of your I/O cycle to get a better idea of where in the cycle the overload is occurring. This information can found in the IO Telemetry window (File->New:)." Unfortunately I can't make head nor tail of how to use that window. How does one get data into the table view? Clicking 'Next' or 'Previous' causes a crash, I think because there are no entries in the table.
Any advice would be appreciated. Any DTrace tricks?
Thanks!
- Jon
Maunsell Lab HHMI / Harvard Medical School
|