class FMOD::Reverb3D

The 3D reverb object is a sphere having 3D attributes (position, minimum distance, maximum distance) and reverb properties.

The properties and 3D attributes of all reverb objects collectively determine, along with the listener's position, the settings of and input gains into a single 3D reverb DSP.

When the listener is within the sphere of effect of one or more 3D reverbs, the listener's 3D reverb properties are a weighted combination of such 3D reverbs. When the listener is outside all of the reverbs, the 3D reverb setting is set to the default ambient reverb setting.

Public Instance Methods

max_distance() click to toggle source

@!attribute max_distance The distance from the center-point that the reverb will not have any effect.

  • Default: 0.0

@return [Float]

# File lib/fmod/reverb3D.rb, line 52
def max_distance
  buffer = "\0" * SIZEOF_FLOAT
  FMOD.invoke(:Reverb3D_Get3DAttributes, self, nil, nil, buffer)
  buffer.unpack1('f')
end
max_distance=(distance) click to toggle source
# File lib/fmod/reverb3D.rb, line 58
def max_distance=(distance)
  FMOD.invoke(:Reverb3D_Set3DAttributes, self, position,
    min_distance, distance )
end
min_distance() click to toggle source

@!attribute min_distance The distance from the center-point that the reverb will have full effect at.

  • Default: 0.0

@return [Float]

# File lib/fmod/reverb3D.rb, line 34
def min_distance
  buffer = "\0" * SIZEOF_FLOAT
  FMOD.invoke(:Reverb3D_Get3DAttributes, self, nil, buffer, nil)
  buffer.unpack1('f')
end
min_distance=(distance) click to toggle source
# File lib/fmod/reverb3D.rb, line 40
def min_distance=(distance)
  FMOD.invoke(:Reverb3D_Set3DAttributes, self, position,
    distance, max_distance )
end
position() click to toggle source

@!attribute position A {Vector} containing the 3D position of the center of the reverb in 3D space.

  • Default: {Vector.zero}

@return [Vector]

# File lib/fmod/reverb3D.rb, line 70
def position
  vector = Vector.zero
  FMOD.invoke(:Reverb3D_Get3DAttributes, self, vector, nil, nil)
  vector
end
position=(vector) click to toggle source
# File lib/fmod/reverb3D.rb, line 76
def position=(vector)
  FMOD.type?(vector, Vector)
  FMOD.invoke(:Reverb3D_Set3DAttributes, self, vector,
    min_distance, max_distance )
end
properties() click to toggle source

@!attribute properties @return [Reverb] the reverb parameters for the current reverb object.

# File lib/fmod/reverb3D.rb, line 86
def properties
  FMOD.invoke(:Reverb3D_GetProperties, self, reverb = Reverb.new)
  reverb
end
properties=(reverb) click to toggle source
# File lib/fmod/reverb3D.rb, line 91
def properties=(reverb)
  FMOD.type?(reverb, Reverb)
  FMOD.invoke(:Reverb3D_SetProperties, self, reverb)
  reverb
end
unknown() click to toggle source

@!attribute active Gets or sets the a state to disable or enable a reverb object so that it does or does not contribute to the 3D scene.

@return [Boolean]

# File lib/fmod/reverb3D.rb, line 24
bool_reader(:active, :Reverb3D_GetActive)