Controlling wave amplitude by arduino
Classic answer : Multiplying DAC or MDAC, e.g. AD7528 (with two channels).
Apply audio input to the reference voltage pin. The output is a current, feeding an opamp in inverting configuration as an I-V converter.
Controlling the DAC's digital inputs then controls the gain of the analog input signal.
More here