Share via


Windows Media Player 11 SDK How the Echo Sample Persists Data 

Windows Media Player SDK banner art

Previous Next

How the Echo Sample Persists Data

When Windows Media Player enables a DSP plug-in, it may create and destroy many instances of the plug-in object during the course of a session. The plug-in needs a way to persist its property values between instances. The sample code generated by the Windows Media Player Plug-in Wizard stores these values in the registry and retrieves them when the property page is invoked or when a new instance of the plug-in is created.

The default sample code in Echo.h includes two constants that store the default registry path and the scale factor name string. You should keep the variable that specifies the path, but delete the line that specifies the scale factor registry name. Then, add the following code to define constants for the delay time and wet mix property names in the registry. The finished section should appear as follows:

// registry location for preferences
const TCHAR kszPrefsRegKey[] = _T("Software\\Echo\\DSP Plugin");
const TCHAR kszPrefsDelayTime[] = _T("DelayTime");
const TCHAR kszPrefsWetmix[] = _T("Wetmix");

You will use these constants when you modify the property page methods.

See Also

Previous Next