Class: FMOD::Reverb3D

Inherits:
Handle
  • Object
show all
Defined in:
lib/fmod/reverb3D.rb

Overview

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.

Instance Attribute Summary collapse

Attributes inherited from Handle

#user_data

Method Summary

Methods inherited from Handle

#initialize, #int_ptr, #release, #to_s

Constructor Details

This class inherits a constructor from FMOD::Handle

Instance Attribute Details

#activeBoolean

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.

Returns:

  • (Boolean)


24
# File 'lib/fmod/reverb3D.rb', line 24

bool_reader(:active, :Reverb3D_GetActive)

#max_distanceFloat

The distance from the center-point that the reverb will not have any effect.

  • Default: 0.0

Returns:

  • (Float)


52
53
54
55
56
# 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

#min_distanceFloat

The distance from the center-point that the reverb will have full effect at.

  • Default: 0.0

Returns:

  • (Float)


34
35
36
37
38
# 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

#positionVector

A Core::Vector containing the 3D position of the center of the reverb in 3D space.

Returns:



70
71
72
73
74
# File 'lib/fmod/reverb3D.rb', line 70

def position
  vector = Vector.zero
  FMOD.invoke(:Reverb3D_Get3DAttributes, self, vector, nil, nil)
  vector
end

#propertiesReverb

Returns the reverb parameters for the current reverb object.

Returns:

  • (Reverb)

    the reverb parameters for the current reverb object.



86
87
88
89
# File 'lib/fmod/reverb3D.rb', line 86

def properties
  FMOD.invoke(:Reverb3D_GetProperties, self, reverb = Reverb.new)
  reverb
end