我正在研究音频效果(这里是android api的audiofx),实时处理录音等,并制作一个可以发布的示例应用程序项目。
我想我快要完成我的项目了。我只是简单地引用了一个可以作为示例的应用程序,并且可以获得一些被反编译的代码片段,但在可以应用于MainActivity
.
总共有 6 个错误
在这里,我揭示了可能导致错误的源代码
我跟踪了错误消息,所以我发现发生错误的代码部分如下
AudioFxActivity.java
1)关于第一个错误行:
PresetReverb localPresetReverb;
if (bool1)
{
i = 0;
localViewGroup.setVisibility(i);
this.equalizer.setEnabled(bool1);
this.bassBoost.setEnabled(this.bassSwitch.isChecked());
j = this.reverbSpinner.getSelectedItemPosition();
localPresetReverb = this.reverb;
if (j <= 0) {
break label136; // here 1st error occured
}
}
label136:
for (boolean bool2 = true;; bool2 = false)
{
localPresetReverb.setEnabled(bool2);
this.reverb.setPreset((short)j);
return;
i = 8;
break;
}
2)关于第二个错误行:
for (boolean bool2 = true;; bool2 = false)
{
localPresetReverb.setEnabled(bool2);
this.reverb.setPreset((short)j); // here 2nd error occured
return;
i = 8;
break;
}
3)关于第三个错误行:
localPresetReverb.setEnabled(bool2); // here 3rd error occured
4)关于第 4 个错误行:
do
{
return;
this.audioForwarder.stop(); // here 4th error occured
this.wakeLock.release();
return;
if (i == 0x7f070004)
{
boolean bool2 = this.eqSwitch.isChecked();
this.equalizer.setEnabled(bool2);
ViewGroup localViewGroup = this.eqSettings;
if (bool2) {}
for (int j = 0;; j = 8)
{
localViewGroup.setVisibility(j);
return;
}
}
} while (i != 0x7f070006);
5)关于第 4 个错误行:
boolean bool1 = this.bassSwitch.isChecked(); // here 5th error occured
6)关于第5个错误行:
for (boolean bool2 = true;; bool2 = false)
{
localPresetReverb.setEnabled(bool2); // here 3rd error occured
this.reverb.setPreset((short)j);
return;
i = 8; // here 6th error occured
break;
}
我想这部分主要是关于错误的问题
do
{
return;
this.audioForwarder.stop();
this.wakeLock.release();
return;
if (i == 0x7f070004)
{
boolean bool2 = this.eqSwitch.isChecked();
this.equalizer.setEnabled(bool2);
ViewGroup localViewGroup = this.eqSettings;
if (bool2) {}
for (int j = 0;; j = 8)
{
localViewGroup.setVisibility(j);
return;
}
}
} while (i != 0x7f070006);
我认为这部分也可能是主要问题
PresetReverb localPresetReverb;
if (bool1)
{
i = 0;
localViewGroup.setVisibility(i);
this.equalizer.setEnabled(bool1);
this.bassBoost.setEnabled(this.bassSwitch.isChecked());
j = this.reverbSpinner.getSelectedItemPosition();
localPresetReverb = this.reverb;
if (j <= 0) {
break label136;
}
}
label136:
for (boolean bool2 = true;; bool2 = false)
{
localPresetReverb.setEnabled(bool2);
this.reverb.setPreset((short)j);
return;
i = 8;
break;
}
这个引用块是关于错误消息的
Description Resource Path Location Type Unreachable code AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 136 Java Problem
The label label136 is missing AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 224 Java Problem
Unreachable code AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 120 Java Problem
The local variable j may not have been initialized AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 231 Java Problem
The local variable localPresetReverb may not have been initialized AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 230 Java Problem
Unreachable code AudioFxActivity.java /MakeEchoMike3/src/com/example/makeechomike line 233 Java Problem
任何解决问题的答案将不胜感激。
祝你有快乐的日子。