PA_GetShortParameter


version 2003


PA_GetShortParameter (params; index) → short

Parameter Type Description
params PA_PluginParameters Parameters received in PluginMain
index short Index of the parameter in params
Function result short Value of the index parameter

Description

The routine PA_GetShortParameter returns the value of type short of the index parameter in params .

See Create a new plugin for a description of parameter accessors.

NOTE

: The first parameter starts at index 1.

Example

In PluginMain, pass a subroutine to parameter 1

   void PluginMain( long selector, PA_PluginParameters params )
   {
      switch ( selector )
      {
         . . .kInitPlugin, kDeinitPlugin ...
 
         case kMyRoutine :
            BeepXTimes(params);
            break;
 
      }
   }
 
   void BeepXTimes (PA_PluginParameters params)
   {
      short   count, i;
   // get the parameter value
      count = PA_GetShortParameter(params, 1);
      for(i = 1; i <= count; i++)
         SysBeep(1);
   }

See Also

Create a new plugin .