Windows Media Player 11 SDK Adding Properties to the Sample Audio DSP Plug-inĀ
Previous | Next |
Adding Properties to the Sample Audio DSP Plug-in
The audio DSP sample code that the Windows Media Player Plug-in Wizard generates uses a single property that represents the scale factor for the audio volume. Your plug-in may require more than one property. You can easily add properties to your DSP plug-in in Visual Studio using the following steps:
Define the methods in the interface definition code in the project's IDL file.
Add the method declarations to the main class declaration in the header file:
STDMETHOD(get_color)(COLORREF *pColor); STDMETHOD(put_color)(COLORREF newColor);
Add the method implementations to the project's main CPP file:
STDMETHODIMP CYourProject::get_color(COLORREF *pColor) { if ( NULL == pColor ) { return E_POINTER; }
*pColor = m_Color;
return S_OK; }
STDMETHODIMP CYourProject::put_color(COLORREF newColor) { m_Color = newColor;
return S_OK;
}
Finally, to make the properties accessible to the user, you'll want to make changes to the property page implementation.
See Also
Previous | Next |