Class: FMOD::Core::DspDescription

Inherits:
Structure
  • Object
show all
Defined in:
lib/fmod/core/dsp_description.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Structure

#inspect, #names, #values

Constructor Details

#initialize(address) ⇒ DspDescription

Returns a new instance of DspDescription.

Parameters:

  • 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.

Since:

  • 0.9.2



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# 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

Instance Attribute Details

#createClosure

Returns Create callback. This is called when DSP unit is created.

Returns:

  • (Closure)

    Create callback. This is called when DSP unit is created.



# File 'lib/fmod/core/dsp_description.rb', line 74

#get_param_boolClosure

Returns Called when the user sets a boolean parameter.

Returns:

  • (Closure)

    Called when the user sets a boolean parameter.



# File 'lib/fmod/core/dsp_description.rb', line 141

#get_param_dataClosure

Returns Called when the user sets a data parameter.

Returns:

  • (Closure)

    Called when the user sets a data parameter.



# File 'lib/fmod/core/dsp_description.rb', line 145

#get_param_floatClosure

Returns Called when the user gets a float parameter.

Returns:

  • (Closure)

    Called when the user gets a float parameter.



# File 'lib/fmod/core/dsp_description.rb', line 133

#get_param_intClosure

Returns Called when the user gets an integer parameter.

Returns:

  • (Closure)

    Called when the user gets an integer parameter.



# File 'lib/fmod/core/dsp_description.rb', line 137

#input_buffersInteger

Returns the number of input buffers to process. Use 0 for DSPs that only generate sound and 1 for effects that process incoming sound.

Returns:

  • (Integer)

    the number of input buffers to process. Use 0 for DSPs that only generate sound and 1 for effects that process incoming sound



# File 'lib/fmod/core/dsp_description.rb', line 65

#nameString

Returns the identifier of the DSP. This will also be used as the name of DSP and shouldn’t change between versions.

Returns:

  • (String)

    the identifier of the DSP. This will also be used as the name of DSP and shouldn’t change between versions.

Since:

  • 0.9.2



51
52
53
# File 'lib/fmod/core/dsp_description.rb', line 51

def name
  self[:name].join.delete("\0")
end

#output_buffersInteger

Returns the number of audio output buffers. Only one output buffer is currently supported.

Returns:

  • (Integer)

    the number of audio output buffers. Only one output buffer is currently supported.



# File 'lib/fmod/core/dsp_description.rb', line 69

#parameter_countInteger

Returns the of parameters used in this filter.

Returns:

  • (Integer)

    the of parameters used in this filter.



# File 'lib/fmod/core/dsp_description.rb', line 109

#parameter_descriptionPointer

Returns a variable number of parameter structures.

Returns:

  • (Pointer)

    a variable number of parameter structures.



# File 'lib/fmod/core/dsp_description.rb', line 113

#plugin_sdk_versionInteger

Returns the plugin SDK version this plugin is built for.

Returns:

  • (Integer)

    the plugin SDK version this plugin is built for.



# File 'lib/fmod/core/dsp_description.rb', line 42

#processClosure

Returns Process callback. Can be specified instead of the read callback if any channel format changes occur between input and output. This also replaces #should_process and should return an error if the effect is to be bypassed.

Returns:

  • (Closure)

    Process callback. Can be specified instead of the read callback if any channel format changes occur between input and output. This also replaces #should_process and should return an error if the effect is to be bypassed.



# File 'lib/fmod/core/dsp_description.rb', line 95

#readClosure

Returns Read callback. Processing is done here.

Returns:

  • (Closure)

    Read callback. Processing is done here.



# File 'lib/fmod/core/dsp_description.rb', line 91

#registerClosure

Returns System mix stage callback. This is called when the mixer starts to execute or is just finishing executing. Useful for ‘global’/per system object once a mix update calls for a plugin.

Returns:

  • (Closure)

    System mix stage callback. This is called when the mixer starts to execute or is just finishing executing. Useful for ‘global’/per system object once a mix update calls for a plugin.



# File 'lib/fmod/core/dsp_description.rb', line 161

#releaseClosure

Returns Release callback. This is called just before the unit is freed so the user can do any cleanup needed for the unit.

Returns:

  • (Closure)

    Release callback. This is called just before the unit is freed so the user can do any cleanup needed for the unit.



# File 'lib/fmod/core/dsp_description.rb', line 79

#resetClosure

Returns Reset callback. This is called by the user to reset any history buffers that may need resetting for a filter, when it is to be used or re-used for the first time to its initial clean state. Use to avoid clicks or artifacts.

Returns:

  • (Closure)

    Reset callback. This is called by the user to reset any history buffers that may need resetting for a filter, when it is to be used or re-used for the first time to its initial clean state. Use to avoid clicks or artifacts.



# File 'lib/fmod/core/dsp_description.rb', line 84

#set_param_boolClosure

Returns Called when the user sets a boolean parameter.

Returns:

  • (Closure)

    Called when the user sets a boolean parameter.



# File 'lib/fmod/core/dsp_description.rb', line 125

#set_param_dataClosure

Returns Called when the user sets a data parameter.

Returns:

  • (Closure)

    Called when the user sets a data parameter.



# File 'lib/fmod/core/dsp_description.rb', line 129

#set_param_floatClosure

Returns Called when the user sets a float parameter.

Returns:

  • (Closure)

    Called when the user sets a float parameter.



# File 'lib/fmod/core/dsp_description.rb', line 117

#set_param_intClosure

Returns Called when the user sets an integer parameter.

Returns:

  • (Closure)

    Called when the user sets an integer parameter.



# File 'lib/fmod/core/dsp_description.rb', line 121

#set_positionClosure

Returns Set position callback. This is called if the unit wants to update its position info but not process data, or reset a cursor position internally if it is reading data from a certain source.

Returns:

  • (Closure)

    Set position callback. This is called if the unit wants to update its position info but not process data, or reset a cursor position internally if it is reading data from a certain source.



# File 'lib/fmod/core/dsp_description.rb', line 102

#should_processClosure

Returns This is called before processing. You can detect if inputs are idle and return Result::OK to process, or any other error code to avoid processing the effect. Use a count down timer to allow effect tails to process before idling!.

Returns:

  • (Closure)

    This is called before processing. You can detect if inputs are idle and return Result::OK to process, or any other error code to avoid processing the effect. Use a count down timer to allow effect tails to process before idling!



# File 'lib/fmod/core/dsp_description.rb', line 149

#user_dataPointer

Returns the user data to be attached to the DSP unit during creation.

Returns:

  • (Pointer)

    the user data to be attached to the DSP unit during creation.



# File 'lib/fmod/core/dsp_description.rb', line 156

#versionInteger

Returns the plugin writer’s version number.

Returns:

  • (Integer)

    the plugin writer’s version number.



# File 'lib/fmod/core/dsp_description.rb', line 61