private String startToneHunt (CircularDataBuffer circBuf,WaveData waveData)	{
			final int HighTONE=1212;
			final int LowTONE=978;
			final int toneDIFFERENCE=HighTONE-LowTONE;
			final int ErrorALLOWANCE=40;
			// Look for a low start tone followed by a high start tone
		    int tone1=xpa2Freq(circBuf,waveData,0);
		    int tone2=xpa2Freq(circBuf,waveData,(int)samplesPerSymbol*1);
		    // Check tone1 is the same as tone2
		    if (tone1!=tone2) return null;
		    int tone3=xpa2Freq(circBuf,waveData,(int)samplesPerSymbol*2);
		    // Check the first tone is lower than the second tone
		    if (tone1>tone3) return null;
		    int tone4=xpa2Freq(circBuf,waveData,(int)samplesPerSymbol*3);
			// Check tone1 and 2 are the same and that tones 3 and 4 are the same also
		    if ((tone1!=tone2)||(tone3!=tone4)) return null;
		    // Check tones2 and 3 aren't the same
		    if (tone2==tone3) return null;
		    // Find the frequency difference between the tones
		    int difference=tone3-tone1;
		    // Check the difference is correct
		    if ((difference<(toneDIFFERENCE-ErrorALLOWANCE)||(difference>(toneDIFFERENCE+ErrorALLOWANCE)))) return null;
		    // Tones found
		    // Look 6 symbols ahead and check we have a low tone
		    int toneAhead=xpa2Freq(circBuf,waveData,(int)samplesPerSymbol*6);
		    if (toneAhead==tone3)	{
		    	// The signal is inverted
		    	theApp.setInvertSignal(true);
		    	tone3=PIVOT-tone3;
		    	correctionFactor=LowTONE-tone3;
		    }
		    else	{
		    	// Isn't inverted
		    	theApp.setInvertSignal(false);
		    	// Calculate the long error correction factor
		    	correctionFactor=LowTONE-tone1;
		    }  
		    // Tell the user
		    String line=theApp.getTimeStamp()+" XPA2 Start Tones Found (correcting by "+Integer.toString(correctionFactor)+" Hz)";
		    return line;
		}