Copyright © 2005-2018 MultiMedia Soft

CustomDSP.ExternalSendCommand 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 methods related to the use of custom DSP effects refer to the CustomDSPs class.

Further information about the use of Custom DSP effects can be found inside the How to manage custom DSP effects tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ExternalSendCommand (

nPlayerIndex as Int16,

nIdDsp as Int32,

hWndParent as IntPtr,

strCommand as string

) as Int32


 

[C#]

public Int32 ExternalSendCommand (

Int16 nPlayerIndex,

Int32 nIdDsp,

IntPtr hWndParent,

string strCommand

);


 

[C++]

public: Int32 ExternalSendCommand (

Int16 nPlayerIndex,

Int32 nIdDsp,

IntPtr hWndParent,

string strCommand

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

nIdDsp

Unique identifier of the custom DSP

hWndParent

Handle of the window (HWND) containing the Audio Dj Studio API for .NET control or any other window that should manage custom responses from the external DSP effect.

This is quite useful when the command will start 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.