This would make the sound more natural than suspend suddenly
Accordingly, we could implement ease-in-out as:
fade in: $\frac{1}{2}(1 - \cos(x\pi))$
fade out: $\frac{1}{2}(1 + \cos(x\pi))$
Which gives curve like:
Also, you may refer to wikipedia for detailed modern approach. cosine function is just the easiest to implement
This would make the sound more natural than suspend suddenly
Accordingly, we could implement ease-in-out as:
fade in:$\frac{1}{2}(1 - \cos(x\pi))$ $\frac{1}{2}(1 + \cos(x\pi))$
fade out:
Which gives curve like:
Also, you may refer to wikipedia for detailed modern approach. cosine function is just the easiest to implement