I use the cc~ external. The time domain function is not so efficient for large sizes, since it's an O(N^2) algorithm. The freq domain version uses a fourier algorithm, so it uses only O(N*log(N)). use [cc~ 1024] for time-domain where +/- 1024 is the bounds of the cc~ use [cc~ f] for one-block at a time measurements in freq. domain and [cc~ r] for running frequency domain cc~ the frequency domain stuff is actually a cross-covariance, rather than cross-correlation. The peak you get from cc~ will not be very clearly defined, because the loudspeaker has reactive elements, phase shifts, etc.... I'm still thinking about the normalization routine to turn the cross-covariance into a cross-correlation (it doesn't matter if all you're looking for is a peak). I'm not sure how to do it yet I would suggest using the running cc~ with a large enough block size to cover the latency and sound sources that are much much longer than that. You'll probably have to get the latest version from Jamie's flib CVS directory http://pure-data.cvs.sourceforge.net/pure-data/externals/postlude/flib/src/ The "zero" location is blocksize/2, so whatever result you get for the peak, you'll want to subtract blocksize/2.
Chuck