The DLL version of the MSSMixer control has a general-purpose interface that can be used by both object-oriented and non-object-oriented languages.
The control properties map onto separate functions to find (get) and set (put) the property values.
The control methods map directly onto functions of a similar name, with the same parameters and return values.
Creating and destroying a DLL MSSMixer control
Before you can use the MSSMixer control, you must create one. You can create as many as you like. The DLL has a special function to do this:
LONG handle = NewMSSMixer()
The returned value handle provides the means to identify and access the control in all of the property and method functions. In C/C++ and Delphi bindings, the supplied header files for the DLL define the special type MSSHANDLE which should be used for the handle.
When you have finished with the control, you should free it by calling the FreeMSSMixer function:
FreeMSSMixer([in] LONG handle)
Accessing control properties
To read a control property that is readable at runtime, you use the function MSSMixer_Get_<name>, where <name> is the property name. For example, to retrieve the NMixers property (which is of type SHORT), you use the function MSSMixer_Get_NMixers:
SHORT value = MSSMixer_Get_NMixers([in] LONG handle)
Note that handle is always the first parameter to every function in the DLL binding, apart from NewMSSMixer.
[STRING properties are treated differently. To retrieve a STRING property, you must pass a pointer to a character buffer as a parameter to the MSSMixer_Get_* function, together with a LONG containing the maximum length of the buffer]
Similarly, to write a control property that is writeable at runtime, you use the function MSSMixer_Put_<name>, e.g. for the MixerNumber parameter:
MSSMixer_Put_MixerNumber([in] LONG handle, [in] LONG newValue)
NOTE that, to overcome problems with passing SHORT integers as input parameters in some languages, LONG integers are used instead in the DLL binding.
Methods
Each method in the control has a corresponding DLL function where an additional first parameter is the control handle. For example, the FindDest method has the corresponding function:
SHORT error = MSSMixer_FindDest([in] LONG handle, [in] LONG destType, [in] LONG destTargetType)
Events
In C/C++ and Delphi the event callback can be set by using the MSSMixer_SetCallback function:
MSSMixer_SetCallback([in] LONG handle, [in] MSSMCALLBACK callback)
The callback parameter is the function to be called when the event occurs. The function must correspond to the special type MSSMCALLBACK, which is defined in the DLL interface header files. To disable the callback, call this function with callback set to NULL (C/C++) or nil (Delphi).
More Information
For explicit information regarding the DLL bindings, see the DLL interface header files:
MSSMixernnn.h - C/C++ header
MSSMixernnn.pas - Delphi interface module