0

I'm studying about audio effect(here audiofx for android api), processing audio recording in real-time etc and making a sample application project that can be released.

I think I am almost completing my project. I simply referred a application that can be sample and could get some code snippets which were decompiled, but found some trouble in the source code that can apply to MainActivity.

it was totally 6 errors

Here I reveal my source code that might be the cause of error

i tracked the error messages, so i found the code parts that occur error as below

AudioFxActivity.java

1) about the first error line :

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) about the 2nd error line :

for (boolean bool2 = true;; bool2 = false)
        {
          localPresetReverb.setEnabled(bool2);
          this.reverb.setPreset((short)j);         // here 2nd error occured
          return;
          i = 8;
          break;
        }

3) about the 3rd error line :

  localPresetReverb.setEnabled(bool2); // here 3rd error occured

4) about the 4th error line :

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) about the 4th error line :

boolean bool1 = this.bassSwitch.isChecked();    // here 5th error occured

6) about the 5th error line :

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;
        }

I suppose that this part is mainly problem about error

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);

I think this part can be also mainly problem

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;
}

This quote block is about the error messages

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

Any answer for trouble shooting will be appreciated.

Happy days for you.

  • Define "some trouble" and post the error code you're getting. – Scott Solmer Feb 25 '15 at 17:56
  • @Okuma.Scott i showed the error messages that's it about the error – migi parasyte Feb 25 '15 at 18:07
  • I edited your message to fix your formatting, but you still need to improve this question. Your code should be just the [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) required to see the error, not all your code. You will get a better response if you take the time to better prepare the code that you're asking people to sift through. – smathy Feb 25 '15 at 19:17
  • @smathy i modified my question, check it please – migi parasyte Mar 02 '15 at 08:36

0 Answers0