Microcontroller PWM output volume
That's actually pretty good &mdash; you've created a multiplying DAC.

The biggest problem I see is that the integrator time constant varies with whether Q1 is on or off &mdash; when it's on, you have only R5 in the circuit, but when it's off, you have R2 + R5 in series. To minimize the effect of this, make R5 a couple of orders of magnitude larger than R2. (Reduce the value of C2 to compensate.)