I am trying to change the volume of an AxWindowsMediaPlayer
Object. Like this.
//Change Volume
private void VolumeTrackBar_ValueChanged(object sender, EventArgs e)
{
if (MidiAxWindowsMediaPlayer != null && VolumeTrackBar != null)
MidiAxWindowsMediaPlayer.settings.volume = VolumeTrackBar.Value*10;
}
If I place a break point inside that if
statement, I can see it is executed as I intended.
But the volume change is not reflected during playback. It always plays at the same volume,no matter if I change the volume before, during or after.
The TrackBar
has a range from 0 to 10, so when I multiply it's value by 10, I will always get something in the range 0-100, which is the range needed by the AxWindowsMediaPlayer
Object.