Exemple #1
0
  public synchronized void rQ(int paramInt) {
    if (!isRunning()) {
      return;
    }

    if (!aNh.eth.a(dEX.lOm)) {
      return;
    }

    if (bUD[0] == 0) {
      bUD[0] = EFX10.alGenAuxiliaryEffectSlots();
      check();
    }

    if (bUC[0] == 0) {
      bUC[0] = EFX10.alGenEffects();
      check();
    }

    if (this.gpu == paramInt) {
      return;
    }
    this.gpu = paramInt;

    aEp localaEp = od(this.gpu);

    if (localaEp != null)
      try {
        EFX10.alEffecti(bUC[0], 32769, 1);

        check();

        EFX10.alEffectf(bUC[0], 1, localaEp.aQv());

        check();

        EFX10.alEffectf(bUC[0], 3, localaEp.aQw());

        check();

        EFX10.alEffectf(bUC[0], 5, localaEp.aQx());

        check();

        EFX10.alEffectf(bUC[0], 6, localaEp.aQy());

        check();

        EFX10.alEffectf(bUC[0], 9, localaEp.aQz());

        check();

        EFX10.alEffectf(bUC[0], 10, localaEp.aQA());

        check();

        EFX10.alAuxiliaryEffectSloti(bUD[0], 1, bUC[0]);

        check();

        oe(bUD[0]);
      } catch (Exception localException) {
        oe(0);
      }
    else oe(0);
  }
Exemple #2
0
  private void bIM() {
    IntBuffer localIntBuffer = BufferUtils.createIntBuffer(64);

    for (int i = 0; i < 64; i++) {
      try {
        int m = AL10.alGenSources();
        check();
        localIntBuffer.put(m);
      } catch (Exception localException1) {
        break;
      }
    }

    this.gpB = localIntBuffer.position();
    localIntBuffer.position(0).limit(this.gpB);
    try {
      AL10.alDeleteSources(localIntBuffer);
      check();
    } catch (OpenALException localOpenALException1) {
      K.warn("Problème au alDeleteSources.", localOpenALException1);
    }

    if (!ALC10.alcIsExtensionPresent(
        ALC10.alcGetContextsDevice(ALC10.alcGetCurrentContext()), "ALC_EXT_EFX")) {
      this.gpD = 0;
      this.gpC = 0;
    } else {
      localIntBuffer.limit(64);
      for (int j = 0; j < 64; j++) {
        try {
          int n = EFX10.alGenEffects();
          check();
          localIntBuffer.put(n);
        } catch (Exception localException2) {
          break;
        }
      }

      this.gpD = localIntBuffer.position();
      localIntBuffer.position(0).limit(this.gpD);
      try {
        EFX10.alDeleteEffects(localIntBuffer);
        check();
      } catch (OpenALException localOpenALException2) {
        K.warn("Problème au alDeleteEffects.", localOpenALException2);
      }

      localIntBuffer.limit(64);
      for (int k = 0; k < 64; k++) {
        try {
          int i1 = EFX10.alGenAuxiliaryEffectSlots();
          check();
          localIntBuffer.put(i1);
        } catch (Exception localException3) {
          break;
        }
      }

      this.gpC = localIntBuffer.position();
      localIntBuffer.position(0).limit(this.gpC);
      try {
        EFX10.alDeleteAuxiliaryEffectSlots(localIntBuffer);
        check();
      } catch (OpenALException localOpenALException3) {
        K.warn("Problème au alDeleteAuxiliaryEffectSlots.", localOpenALException3);
      }
    }
  }