The problem is somewhat similar to DTMF recognition (figuring out "two-sound chords" produced by telephone buttons). A very efficient
Goertzel Algorithm[
^] is used rather widely for that. It may or may not help you solve the problem at hand, but it's definitely worth giving a try. Good luck!