Microsoft DirectX 8.1 (Visual Basic)

Step 8: Set Audiopath Parameters

At any time, the user of the sample application can set the volume on the audiopath by moving the slider. In response, the application calls DirectMusicAudioPath8.SetVolume. The change affects all segments played on the audiopath. If the application had multiple audiopaths, segments played on other audiopaths would not be affected.

Private Sub scrlVol_Change()
  dmPath.SetVolume scrlVol.Value, 0
End Sub

The first parameter is the new volume, in hundredths of a decibel. The application allows the volume to be lowered by up to 50 decibels. The second value is the fade time, or the duration over which the change in volume takes place. In this case, the new volume is set immediately.

Next: Step 9: Set 3-D Parameters