Class OALEffectSlot

java.lang.Object
com.blackrook.gloop.openal.OALObject
com.blackrook.gloop.openal.OALEffectSlot

public class OALEffectSlot extends OALObject
Auxiliary Effect Slot for enforcing effect mixing rules.
Author:
Matthew Tropiano
  • Field Details

    • effect

      protected OALEffect effect
      Effect bound to this slot.
    • slotGain

      protected float slotGain
      Effect slot gain.
    • autoUpdating

      protected boolean autoUpdating
      Does this auto update itself if the Effect changes?
  • Method Details

    • allocate

      protected int allocate()
      Description copied from class: OALObject
      Allocates a new type of this object in OpenAL. Called by OALObject constructor.
      Specified by:
      allocate in class OALObject
      Returns:
      the ALId of this new object.
    • free

      protected final void free()
      Description copied from class: OALObject
      Destroys this object (deallocates it on OpenAL). This is called by destroy().
      Specified by:
      free in class OALObject
    • setEffect

      public void setEffect(OALEffect effect)
      Sets an Effect in this slot. Can be null to remove the Effect.
      Parameters:
      effect - the effect to add.
    • getEffect

      public OALEffect getEffect()
      Returns:
      the reference of the Effect bound to this slot.
    • removeEffect

      public OALEffect removeEffect()
      Removes the effect in this slot.
      Returns:
      the effect removed.
    • getGain

      public float getGain()
      Returns:
      the effect slot gain.
    • setGain

      public void setGain(float gain)
      Sets effect slot gain.
      Parameters:
      gain - the gain to use.
    • isAutoUpdating

      public final boolean isAutoUpdating()
      Does this auto update itself if the Effect changes?
      Returns:
      true if so, false if not.
    • setAutoUpdating

      public final void setAutoUpdating(boolean autoUpdate)
      Sets if this auto update itself if the Effect changes.
      Parameters:
      autoUpdate - true if so, false if not.