Well, if you want to test your mid/side processing just temporarily set mono = 0.0, and your width to 1.0. This will leave only the sides, so if you feed it a mono signal you should get silence, but if you feed it a stereo signal you should get some output.
BTW, you don't need to declare all variables in your class, variables that are only used by a single method are probably better declared locally to that method. I would also suggest to prefix member variables with m (or m_), so it is easier to distinguish between local and member variables. E.g.:
Code:
class StereoWidth
{
public:
// Init coef to sensible default, in case we forget to call setWidth().
StereoWidth(): mCoef_S(0) {}
void process(double in_left, double in_right, double* out_left, double* out_right)
{
double mono = (in_left + in_right) * 0.5;
double stereo = (in_right - in_left ) * mCoef_S;
*out_left = mono - stereo;
*out_right = mono + stereo;
}
inline void setWidth(double newWidth)
{
mCoef_S = newWidth * 0.5;
}
private:
double mCoef_S;
};