I am writing a MidiEditor in C# where I work with MIDI data and MIDI devices using the DryWetMIDI library.
I found in the documentation that the OutputDevice
class has a GetProperty(OutputDeviceProperty)
method in which you can pass enum OutputDeviceOption.Volume
, to get the output device volume value. But in my case unfortunately it returns just text "Volume" instead of value.
Please provide me with an example of how to get the OutputDevice volume value correctly and how to change it.
I'm the author of DryWetMIDI.
First of all, OutputDeviceOption.Volume
just means that a device supports volume control. This option is not for getting volume. And that for Windows only. Right now there is no way to get/set volume of an output device.
DryWetMIDI Devices API supports Windows and macOS. There are functions to control volume in Windows but such API missing in macOS so it's impossible to provide universal API. Also I had problems with setting volume of output devices when I played with Windows API. So I've decided to not provide volume management methods at all.