From: Globally static. Globally on

I need to control the gain of the speaker which cracks when PCM is played.
Can I use the waveOutSetProperty() as below?
The code below gives a syntax error for the 2nd param of the function.What
exactly should be passed?

STREAMPROPS mStreamProps={0};

/*
Stream Prop.
*/
mStreamProps.dwClassID = WAGC_CLASS_SPEECH_ALERT;
mStreamProps.dwFlags = SPSFL_NOTIFY_GAIN_CHANGE;

mmRes = waveOutSetProperty((UINT)hwavein,
&MM_PROPSET_GAINCLASS_STREAM,
MM_PROP_GAINCLASS_STREAM,
&mStreamProps,
sizeof(STREAMPROPS),
&(mStreamProps.dwClassID),
sizeof(DWORD));

Any help is appreciated?