title: Directsound logarithm volume to linear volume slider
body: <p>I am developing an music player with DirectX.DirectSound. I have a problem with the volume. The directsound volume is logarithm. This means that with silent sounds, is much more sensitive to small variations in amplitude than with loud sounds. It also means that with a linear volume slider we have a logarithmic sensation of volume variations, and that just doesn't feel right. My question is: How can I make it linear?
  My code until here is:</p>
  
  <pre><code> if (trkBalance.Value == trkBalance.Minimum)
              {
                  foreGroundSound.Volume = (int)DS.Volume.Min;
  
              }
              else if (trkBalance.Value == trkBalance.Maximum)
              {
                  foreGroundSound.Volume = (int)DS.Volume.Max;
              }
              else
              {
                 foreGroundSound.Volume = (int)(-5000 * Math.Log10(100 - trkBalance.Value));
              }
  </code></pre>