class FMOD::Core::DspDescription

When creating a DSP unit, declare one of these and provide the relevant callbacks and name for FMOD to use when it creates and uses a DSP unit of this type. @since 0.9.2

Public Class Methods

new(address) click to toggle source

@param address [Pointer, Integer, String, nil] The address in memory

where the structure will be created from. If no address is given, new
memory will be allocated.
Calls superclass method
# File lib/fmod/core/dsp_description.rb, line 14
def initialize(address)
  types = [:plugin_sdk_version, :name, :version, :input_buffers,
           :output_buffers, :create, :release, :reset, :read, :process,
           :set_position, :parameter_count, :parameter_description,
           :set_param_float, :set_param_int, :set_param_bool,
           :set_param_data, :get_param_float, :get_param_int,
           :get_param_bool, :get_param_data, :should_process, :user_data,
           :register, :deregister, :mix]
  members = [TYPE_INT, [TYPE_CHAR, 32], TYPE_INT, TYPE_INT, TYPE_INT,
             TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP,
             TYPE_VOIDP, TYPE_INT, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP,
             TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP,
             TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP, TYPE_VOIDP,
             TYPE_VOIDP]
  super(address, types, members)
end

Public Instance Methods

name() click to toggle source

@!attribute name @return [String] the identifier of the DSP. This will also be used as

the name of DSP and shouldn't change between versions.
# File lib/fmod/core/dsp_description.rb, line 51
def name
  self[:name].join.delete("\0")
end
name=(name) click to toggle source
# File lib/fmod/core/dsp_description.rb, line 55
def name=(name)
  chars = name.chars.slice(0, 32)
  chars << "\0" while chars.size < 32
  self[:name] = chars
end