If you are playing an audio file using mplayer command, you can set loudness of the sound using
-volume parameter.
Now play an mp3 file using
Code:
mplayer -volume 0 /path/of/audio/theme.mp3
and after that
mplayer -volume 150 /path/of/audio/theme.mp3
You can hear the difference.
If you want to increase the volume gradually. Create a loop and increase volume when it plays the file again.
Code:
i=50
while :
do
i=`expr $i + 10`
mplayer -volume $i /path/of/file.mp3
done
It will play the file until you kill the process. You can use `break` to stop playing file if `$i` reaches at it's sufficient value (you can not bear to listen the sound again).
But if your sound is a 5 minute song and you want it should increase the volume gradually for same file not for the loop.
This may be interesting. I do not know if mplayer provides any option like this.