|
@@ -22,7 +22,8 @@ public class MusicTunerHelper {
|
|
|
}
|
|
|
|
|
|
public void start() {
|
|
|
- mDispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050, 2048, 0);
|
|
|
+ mDispatcher = AudioDispatcherFactory.fromDefaultMicrophone(44100, 6144, 0);
|
|
|
+// mDispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050, 2048, 0);
|
|
|
PitchDetectionHandler pdh = new PitchDetectionHandler() {
|
|
|
@Override
|
|
|
public void handlePitch(PitchDetectionResult res, AudioEvent e) {
|
|
@@ -33,7 +34,7 @@ public class MusicTunerHelper {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
- AudioProcessor p = new PitchProcessor(PitchProcessor.PitchEstimationAlgorithm.FFT_YIN, 22050, 2048, pdh);
|
|
|
+ AudioProcessor p = new PitchProcessor(PitchProcessor.PitchEstimationAlgorithm.FFT_YIN, 44100, 6144, pdh);
|
|
|
mDispatcher.addAudioProcessor(p);
|
|
|
mThread = new Thread(mDispatcher, "Audio Dispatcher");
|
|
|
mThread.start();
|