我正在开发一个拍手检测安卓应用程序。我为此使用了musicg api。
我从 github 导入项目并在 android 设备上运行。然后显示此错误 - DetectionAPI 仅支持单声道 Wav
详细的 LogCat 是-
DetectionAPI supports mono Wav only
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.musicg.wave.WaveHeader.getBitsPerSample()' on a null object reference
at com.musicg.api.DetectionApi.isSpecificSound(DetectionApi.java:80)
at com.musicg.api.WhistleApi.isWhistle(WhistleApi.java:54)
at com.musicg.demo.android.DetectorThread.run(DetectorThread.java:106)
at java.lang.Thread.run(Thread.java:818)
有没有人有任何建议如何解决这个问题?