
Here’s an app note from Maxim describing the use of a digital potentiometer in analog circuits like amplifiers and filters. By using a digital potentiometer in an op-amps feedback loop, a digitally controllable variable gain amplifier is constructed.
Variable gain amplifiers often use a mechanical potentiometer to set the gain. An example is a volume control dial. However, when the analog signal path is digitally controlled, a digital potentiometer might be used to control gain. This article discusses the use of the digital potentiometer to form digitally controlled gain or filter blocks.

If you are designing circuits like this, be careful of the capacitance inherent in the digital potentiometers. You may need to add some compensation to avoid issues with frequency response.
Also note initial startup conditions, as many digital pots default to different values at powerup, potentially making the analog circuit do unexpected things until the digipot is initialized/set correctly.