Gorilla.Audio.FMOD.DSP
Unit Gorilla.Audio.FMOD.DSP.pasClasses
- TGorillaFMODDSP = class ( TGorillaFMODObject , IGorillaFMODDSP )
- TGorillaFMODDSPConnection = class ( TGorillaFMODObject , IGorillaFMODDSPConnection )
TGorillaFMODDSP
Wrapper record structure for DSP instances.
Ancestors
Implements Interfaces
- IGorillaFMODDSP
Members
Methods
- public constructor CreateFromDescription
(
ASystem :
IGorillaFMODSystem; const
ADescription :
PFMOD_DSPDescription
)
;
Creates a user defined DSP unit object to be inserted into a DSP network, for the purposes of sound filtering or sound generation.
A DSP unit can generate or filter incoming data. The data is created or filtered through use of the read callback that is defined by the user. See the definition for the FMOD_DSP_DESCRIPTION structure to find out what each member means. To be active, a unit must be inserted into the FMOD DSP network to be heard. Use functions such as ChannelGroup::addDSP, Channel::addDSP or DSP::addInput to do this. For more information and a detailed description (with diagrams) see the tutorial on the DSP system in the documentation.
- public constructor CreateFromType
(
ASystem :
IGorillaFMODSystem; AType :
FMOD_DSP_TYPE
)
;
Creates an FMOD defined built in DSP unit object to be inserted into a DSP network, for the purposes of sound filtering or sound generation. This function is used to create special effects that come built into FMOD.
- public destructor Destroy
(
)
;
Frees a DSP object.
- protected function GetSystemObject ( ) : Pointer ; override;
- protected function GetNumInputs ( ) : Integer ;
- protected function GetNumOutputs ( ) : Integer ;
- protected function GetActive ( ) : LongBool ;
- protected procedure SetActive ( const AValue : LongBool ) ;
- protected function GetBypass ( ) : LongBool ;
- protected procedure SetBypass ( const AValue : LongBool ) ;
- protected function GetWetDryMix ( ) : TGorillaFMODWetDryMix ;
- protected procedure SetWetDryMix ( const AValue : TGorillaFMODWetDryMix ) ;
- protected function GetChannelFormat ( ) : TGorillaFMODChannelFormat ;
- protected procedure SetChannelFormat ( const AValue : TGorillaFMODChannelFormat ) ;
- protected function GetNumParameters ( ) : Integer ;
- protected function GetType ( ) : FMOD_DSP_TYPE ;
- protected function GetIdle ( ) : LongBool ;
- protected function GetUserData ( ) : Pointer ;
- protected procedure SetUserData ( const AValue : Pointer ) ;
- public procedure Play
(
AChannelGroup :
IGorillaFMODChannelGroup
=
nil
; APaused :
LongBool
=
False
)
;
Plays a DSP unit object and its input network on a particular channel.
- public function PlayWithChannel
(
AChannelGroup :
IGorillaFMODChannelGroup
=
nil
; APaused :
LongBool
=
False
)
: IGorillaFMODChannel
;
Plays a DSP unit object and its input network on a particular channel.
- public procedure AddInput
(
AInput :
IGorillaFMODDSP; out
AConnection :
IGorillaFMODDSPConnection; AType :
FMOD_DSPCONNECTION_TYPE
)
;
Adds the specified DSP unit as an input of the DSP object.
Parameters
- AInput : IGorillaFMODDSP - The DSP unit to add as an input of the current unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore. The type of connection between the 2 units. See FMOD_DSPCONNECTION_TYPE.
- out AConnection : IGorillaFMODDSPConnection - The DSP unit to add as an input of the current unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore. The type of connection between the 2 units. See FMOD_DSPCONNECTION_TYPE.
- AType : FMOD_DSPCONNECTION_TYPE - The DSP unit to add as an input of the current unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore. The type of connection between the 2 units. See FMOD_DSPCONNECTION_TYPE.
- public procedure DisconnectFrom
(
ATarget :
IGorillaFMODDSP; AConnection :
IGorillaFMODDSPConnection
)
;
Disconnect the DSP unit from the specified input.
Parameters
- ATarget : IGorillaFMODDSP - The input unit that this unit is to be disconnected from. Specify 0 or NULL to disconnect the unit from all outputs and inputs. If there is more than one connection between 2 dsp units, this can be used to define which of the connections should be disconnected.
- AConnection : IGorillaFMODDSPConnection - The input unit that this unit is to be disconnected from. Specify 0 or NULL to disconnect the unit from all outputs and inputs. If there is more than one connection between 2 dsp units, this can be used to define which of the connections should be disconnected.
- public procedure DisconnectAll
(
AInputs :
LongBool; AOutputs :
LongBool
)
;
Helper function to disconnect either all inputs or all outputs of a dsp unit.
Parameters
- AInputs : LongBool - true = disconnect all inputs to this DSP unit. false = leave input connections alone. true = disconnect all outputs to this DSP unit. false = leave output connections alone.
- AOutputs : LongBool - true = disconnect all inputs to this DSP unit. false = leave input connections alone. true = disconnect all outputs to this DSP unit. false = leave output connections alone.
- public procedure GetInput
(
AIndex :
Integer; out
AInput :
IGorillaFMODDSP; out
AInputConnection :
IGorillaFMODDSPConnection
)
;
Retrieves a pointer to a DSP unit which is acting as an input to this unit.
Parameters
- AIndex : Integer - Index of the input unit to retrieve. Address of a variable that receieves the pointer to the desired input unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- out AInput : IGorillaFMODDSP - Index of the input unit to retrieve. Address of a variable that receieves the pointer to the desired input unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- out AInputConnection : IGorillaFMODDSPConnection - Index of the input unit to retrieve. Address of a variable that receieves the pointer to the desired input unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- public procedure GetOutput
(
AIndex :
Integer; out
AOutput :
IGorillaFMODDSP; out
AOutputConnection :
IGorillaFMODDSPConnection
)
;
Retrieves a pointer to a DSP unit which is acting as an output to this unit.
Parameters
- AIndex : Integer - Index of the output unit to retrieve. Address of a variable that receieves the pointer to the desired output unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- out AOutput : IGorillaFMODDSP - Index of the output unit to retrieve. Address of a variable that receieves the pointer to the desired output unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- out AOutputConnection : IGorillaFMODDSPConnection - Index of the output unit to retrieve. Address of a variable that receieves the pointer to the desired output unit. The connection between the 2 units. Optional. Specify 0 or NULL to ignore.
- public function GetOutputChannelFormat
(
AInMask :
Cardinal; AInChannels :
Integer; AInSpeakerMode :
FMOD_SPEAKERMODE
)
: TGorillaFMODChannelFormat
;
overload;
Call the DSP process function to retrieve the output signal format for a DSP based on input values.
- public function GetOutputChannelFormat ( AInputChannelFormat : TGorillaFMODChannelFormat ) : TGorillaFMODChannelFormat ; overload;
- public procedure Reset
(
)
;
Calls the DSP unit's reset function, which will clear internal buffers and reset the unit back to an initial state.
- public procedure SetParameterFloat
(
AIndex :
Integer; AValue :
Single
)
;
Sets a DSP unit's floating point parameter by index. To find out the parameter names and range, see the see also field.
- public procedure SetParameterInt
(
AIndex :
Integer; AValue :
Integer
)
;
Sets a DSP unit's integer parameter by index. To find out the parameter names and range, see the see also field.
- public procedure SetParameterBool
(
AIndex :
Integer; AValue :
LongBool
)
;
Sets a DSP unit's boolean parameter by index. To find out the parameter names and range, see the see also field.
- public procedure SetParameterData
(
AIndex :
Integer; AData :
Pointer; ALength :
Cardinal
)
;
Sets a DSP unit's binary data parameter by index. To find out the parameter names and range, see the see also field.
- public procedure GetParameterFloat
(
AIndex :
Integer; var
AValue :
Single; var
AValueStr :
string
)
;
Retrieves a DSP unit's floating point parameter by index. To find out the parameter names and range, see the see also field.
- public procedure GetParameterInt
(
AIndex :
Integer; var
AValue :
Integer; var
AValueStr :
string
)
;
Retrieves a DSP unit's integer parameter by index. To find out the parameter names and range, see the see also field.
- public procedure GetParameterBool
(
AIndex :
Integer; var
AValue :
LongBool; var
AValueStr :
string
)
;
Retrieves a DSP unit's boolean parameter by index. To find out the parameter names and range, see the see also field.
- public procedure GetParameterData
(
AIndex :
Integer; var
AData :
Pointer; var
ALength :
Cardinal; var
AValueStr :
string
)
;
Retrieves a DSP unit's data block parameter by index. To find out the parameter names and range, see the see also field.
- public procedure GetParameterInfo
(
AIndex :
Integer; var
ADesc :
PFMOD_DSPParameterDesc
)
;
Retrieve information about a specified parameter within the DSP unit.
- public function GetDataParameterIndex
(
ADatatype :
Integer
)
: Integer
;
Retrieve the index of the first data parameter of a particular data type.
- public procedure ShowConfigDialog
(
AHWND :
Pointer; AShow :
LongBool
)
;
Display or hide a DSP unit configuration dialog box inside the target window.
Parameters
- AHWND : Pointer - Target HWND in windows to display configuration dialog. true = show dialog box inside target hwnd. false = remove dialog from target hwnd.
- AShow : LongBool - Target HWND in windows to display configuration dialog. true = show dialog box inside target hwnd. false = remove dialog from target hwnd.
- public function GetInfo
(
)
: TGorillaFMODDSPInfo
;
Retrieves information about the current DSP unit, including name, version, default channels and width and height of configuration dialog box if it exists.
- public procedure SetMeteringEnabled
(
AInputEnabled :
LongBool; AOutputEnabled :
LongBool
)
;
Enable metering for a DSP unit so that DSP::getMeteringInfo will return metering information, and so that FMOD Studio profiler tool can visualize the levels.
Parameters
- AInputEnabled : LongBool - Enable metering for the input signal (pre-processing). Specify true to turn on input level metering, false to turn it off. Enable metering for the output signal (post-processing). Specify true to turn on output level metering, false to turn it off.
- AOutputEnabled : LongBool - Enable metering for the input signal (pre-processing). Specify true to turn on input level metering, false to turn it off. Enable metering for the output signal (post-processing). Specify true to turn on output level metering, false to turn it off.
- public procedure GetMeteringEnabled
(
var
AInputEnabled :
LongBool; var
AOutputEnabled :
LongBool
)
;
Retrieve the information about metering for a particular DSP to see if it is enabled or not.
Parameters
- var AInputEnabled : LongBool - Address of a variable to receive the metering enabled state for the DSP, for the intput signal (pre-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore. Address of a variable to receive the metering enabled state for the DSP, for the output signal (post-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore.
- var AOutputEnabled : LongBool - Address of a variable to receive the metering enabled state for the DSP, for the intput signal (pre-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore. Address of a variable to receive the metering enabled state for the DSP, for the output signal (post-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore.
- public procedure GetMeteringInfo
(
var
AInputInfo :
FMOD_DSP_METERING_INFO; var
AOutputInfo :
FMOD_DSP_METERING_INFO
)
;
Retrieve the metering information for a particular DSP.
Parameters
- var AInputInfo : FMOD_DSP_METERING_INFO - Address of a variable to receive metering information for the DSP, for the intput signal (pre-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore. Address of a variable to receive metering information for the DSP, for the output signal (post-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore.
- var AOutputInfo : FMOD_DSP_METERING_INFO - Address of a variable to receive metering information for the DSP, for the intput signal (pre-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore. Address of a variable to receive metering information for the DSP, for the output signal (post-processing). true = on, false = off. Optional. Specify 0 or NULL to ignore.
Properties
- public NumInputs : Integer
- public NumOutputs : Integer
- public Active : LongBool
- public Bypass : LongBool
- public WetDryMix : TGorillaFMODWetDryMix
Allows the user to scale the affect of a DSP effect, through control of the 'wet' mix, which is the post-processed signal and the 'dry' which is the pre-processed signal.
read GetWetDryMix
write SetWetDryMix - public ChannelFormat : TGorillaFMODChannelFormat
Sets the signal format of a dsp unit so that the signal is processed on the speakers specified. Also defines the number of channels in the unit that a read callback will process, and the output signal of the unit.
read GetChannelFormat
write SetChannelFormat - public NumParameters : Integer
- public _Type : FMOD_DSP_TYPE
- public Idle : LongBool
Retrieves the idle state of a DSP. A DSP is idle when no signal is coming into it. This can be a useful method of determining if a DSP sub branch is finished processing, so it can be disconnected for example.
read GetIdle - public UserData : Pointer
A user value that the DSP object will store internally. Can be retrieved with DSP::getUserData.
read GetUserData
write SetUserData
TGorillaFMODDSPConnection
Default wrapper record structure for handling FMODDSPConnections.
Ancestors
Implements Interfaces
- IGorillaFMODDSPConnection
Members
Methods
- private function GetInput ( ) : IGorillaFMODDSP ;
- private function GetOutput ( ) : IGorillaFMODDSP ;
- private function GetMix ( ) : Single ;
- private procedure SetMix ( const AValue : Single ) ;
- private function GetMixMatrix ( ) : TGorillaFMODMixMatrix ;
- private procedure SetMixMatrix ( const AValue : TGorillaFMODMixMatrix ) ;
- private function GetType ( ) : FMOD_DSPCONNECTION_TYPE ;
- private function GetUserData ( ) : Pointer ;
- private procedure SetUserData ( const AValue : Pointer ) ;
Properties
- public Input : IGorillaFMODDSP
- public Output : IGorillaFMODDSP
- public Mix : Single
- public MixMatrix : TGorillaFMODMixMatrix
Sets a NxN panning matrix on a DSP connection. Skipping/hop is supported, so memory for the matrix can be wider than the width of the inchannels parameter.
read GetMixMatrix
write SetMixMatrix - public _Type : FMOD_DSPCONNECTION_TYPE
Returns the type of the connection between 2 DSP units. This can be FMOD_DSPCONNECTION_TYPE_STANDARD, FMOD_DSPCONNECTION_TYPE_SIDECHAIN, FMOD_DSPCONNECTION_TYPE_SEND or FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN.
read GetType - public UserData : Pointer
Sets a user value that the DSPConnection object will store internally. Can be retrieved with DSPConnection::getUserData.
read GetUserData
write SetUserData