Digital gain control with a digital pot?
I can see two things that are not optimal in that design. For the discussion I will use a random digital potentiometer I found from this article: The DS1881. Most are similar in construction.
Wiper resistance
A digital potentiometer has a pretty high wiper resistance, especially compared to a mechanical potentiometer. Not only is it high, possibly in the order of hundreds of ohms, but it is also not very stable or well-defined. The DS1881 lists it as 160 Ω typical, but up to 250 Ω maximum. It can vary with the signal voltage and such.
It is not a problem if it is in series with a high impedance input, for example the input of an op-amp. Then there is negligible current through it, and thus, a negligible voltage drop. In your case, the wiper is in parallel with a section of the potentiometer:



simulate this circuit &ndash; Schematic created using CircuitLab
Since some amount of current will flow here, it will affect the signal. How bad? Not much, it is somewhat swamped by the 10 kΩ series resistance and the rest of the potentiometer section, but that leads to the next problem:
Absolute resistance variation
A digital potentiometer has a well-defined and trimmed ratio, but its absolute resistance can vary a lot:




PARAMETER
SYMBOL
CONDITIONS
MIN
TYP
MAX
UNITS




End-to-End Resistance
REE
+25 °C

45

kΩ


End-to-End Resistance Tolerance

+25 °C
-20

+20
%


Ratiometric Temperature Coefficient



30

ppm/°C


End-to-End Resistance Temperature Coefficient



750

ppm/°C


Wiper Resistance
RW


160
250
Ω




Note the ±20% resistance tolerance, and the 750 ppm/°C temperature coefficient.
Since you want to use it as a rheostat, you are hit by this. If it matters, that is up to you. It will really only make the gain fluctuate a bit by temperature and so on. A digital potentiometer should really be used as a voltage divider, so you can take advantage of the close matching between the steps.
The article I linked to, from Maxim, has a few audio circuits you may want to take a look at, with pros and cons.