site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Dec 25, 2006, at 7:21 PM, Josh Rodatus wrote: = Mike _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... As I mentioned earlier, my user-space program is a music beat visualizer. It merely needs read access to the outbound audio stream, and it gets it from my kernel extension. No audio is sent back to the kernel. To minimize latency, all the AudioIOFunction does is send the samples over a socket to my program - no preprocessing. You will find the source code and more detail in one of my previous posts in this thread. So once again my problem is this. The client program is using very little CPU, yet the system audio stutters when I even as much as activate a window. So I conclude that using a socket to transfer the samples from kernel to program isn't efficient enough, and am in search of an alternative. The problem is that you are introducing latency into the process, probably because you are serialising the audio output behind some or all of your display code. It sounds like what you want is a tap on the output, not to actually be blocking the output path. Also, you definitely don't want to be doing any real work on the output thread. Without changing your model too much, the best suggestion I have is for you to implement a lossy buffer (a ring of some sort) in memory supplied via a userclient, and just copy into that ring while you're copying from input to output. I still don't think that's as good as a straight tap would be, but I'm afraid I don't know enough about the audio stack to know how you'd go about getting there. This email sent to site_archiver@lists.apple.com
participants (1)
-
Michael Smith