Copyright © 2011-2018 MultiMedia Soft

Effects.CustomDspExternalSendCommand method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sends a custom command to the given DSP effect.

You can define your own set of custom commands that will allow communicating with the external DSP effect. The DSP effect will have the possibility to immediately reply to a custom command through the return value of this method or, at a later time, through the use of the PostMessage Windows API, sending a user-defined message to the window (HWND) of the container form or dialog box.

 

For further details about managing a custom DSP effect refer to the How to manage custom DSP effects section.

For further details about methods related to the use of special effects refer to the EffectsMan class.

 

 

Syntax

 

[Visual Basic]

Public Function CustomDspExternalSendCommand (

nIdDsp as Int32,

hWndParent as IntPtr,

strCommand as string

) as Int32


 

[C#]

public Int32 CustomDspExternalSendCommand (

Int32 nIdDsp,

IntPtr hWndParent,

string strCommand

);


 

[C++]

public: Int32 CustomDspExternalSendCommand (

Int32 nIdDsp,

IntPtr hWndParent,

string strCommand

);


 

 

Parameter

Description

 

 

nIdDsp

Unique identifier of the custom DSP as returned by the Effects.CustomDspExternalLoad method

hWndParent

Handle of the window (HWND) containing the Audio Sound Editor API or any other window that should manage custom responses from the external DSP effect.

This is quite useful when the container application has a user interface and the command starts a secondary thread in order to perform a custom action and the command's result will not be immediately available to be returned through the return value of this method: the external DSP effect will use this HWND as a parameter for a call to the PostMessage Window API.

strCommand

String containing the custom command to be sent to the DSP effect: you are absolutely free to define your own set of commands with related parameters.

Custom commands can be seen as a sort of "command line" where you can define your own set of options and parameters: parsing available options and parameters will be a task of the external custom DSP effect.

One further possible use of this parameter is sending XML formatted string that will be parsed and managed by the external DSP effect.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details). You can define your own set of negative return values, which usually define an error condition, using values under -1000.

>= 0

A custom return value: you can define your own set of return values in order to let the container application know the result of the custom command.