@Override public void run() { myRecordDiagram.startDrawing(); myRecordDiagram.setMinMax(-600f, 600f); myFrequenceDiagram.startDrawing(); myFrequenceDiagram.setMax(30000); myFFTInverDiagram.startDrawing(); myFFTInverDiagram.setMinMax(-600f, 600f); myFrequenceDiagram2.startDrawing(); myFrequenceDiagram2.setMax(30000); audioRecord.startRecording(); fftForwardThread = new FFTForwardThread(myHandler); fftForwardThread.start(); MicroRecordThread = new MicroRecordThread(myHandler); MicroRecordThread.start(); eqThread = new EQThread(myHandler); eqThread.start(); fftInverseThread = new FFTInverseThread(myHandler); fftInverseThread.start(); fftForwardThread2 = new FFTForwardThread2(myHandler); fftForwardThread2.start(); }
@Override public void onDestroyView() { if (MicroRecordThread != null) MicroRecordThread.stopThread(); if (fftForwardThread != null) fftForwardThread.stopThread(); if (eqThread != null) eqThread.stopThread(); if (fftInverseThread != null) fftInverseThread.stopThread(); if (fftForwardThread2 != null) fftForwardThread2.stopThread(); super.onDestroyView(); }