I have a background sound playing in an endless loop. I want it to fade out when the user does press a button.
I tried the following:
Or you can just, do this:
while (waveOut.volume > 0.1) { waveOut.volume -= 0.1; System.Threading.Thread.Sleep(10); }
^ An example of a fade-out. I use it in my own programs, works fine.