Play/pause smooth volume cero to preset value

I am looking for something (API, new feature, DSP, hardware) that could achieve the following:

Let’s say the user has a usual volume of -30 dB.

This ‘feature’ would let the user tell the system to go from silence to -30dB in ‘5 seconds, or 3,…) when he hits play after having paused the music. Viceversa for pausing. Same thing for the power on / power.

Any ideas?

Please point me in the right direction