Optimized tone detection