Three simple ways to voltage control the gain of an LM386.
1) Using a JFET as an AC coupled variable resistor from pin 1 to ground.
This works reasonably well and has relatively low distortion.
See:
Vishay AN105. FETS as voltage controlled resistors.
http://www.vishay.com/docs/70598/70598.pdf
2) Using an NPN BJT in place of a JFET. This works but produces relatively...