|
@@ -22,9 +22,7 @@ public class MusicTunerHelper {
|
|
}
|
|
}
|
|
|
|
|
|
public void start() {
|
|
public void start() {
|
|
- if (mDispatcher == null) {
|
|
|
|
- mDispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050, 2048, 0);
|
|
|
|
- }
|
|
|
|
|
|
+ mDispatcher = AudioDispatcherFactory.fromDefaultMicrophone(22050, 2048, 0);
|
|
PitchDetectionHandler pdh = new PitchDetectionHandler() {
|
|
PitchDetectionHandler pdh = new PitchDetectionHandler() {
|
|
@Override
|
|
@Override
|
|
public void handlePitch(PitchDetectionResult res, AudioEvent e) {
|
|
public void handlePitch(PitchDetectionResult res, AudioEvent e) {
|