Why can't I set the volume for the USB / Firewire Audio interface using IAudioEndpointVolume :: SetMasterVolumeLevelScalar

I am trying to fix an Audacity error that revolves around portmixer. The output / input level is adjusted using the mac portmixer version, but not always in windows. I am debugging portmixer window code to try to get it to work there.

Using IAudioEndpointVolume :: SetMasterVolumeLevelScalar to set the main volume is great for embedded sound, but using external USB or FireWire external interfaces such as RME Fireface 400, the output volume will not change, although it is reflected in the window's sound control panel for this device, as well in the system mixer.

In addition, outside our program, changing the main slider for the system mixer (on the taskbar), there is no effect - the sound card displays the same (full) level regardless of the level that the system is talking about. The only way to change the output level is to use a custom application that hardware developers provide with a map.

The IAudioEndpointVolume :: QueryHardwareSupport function returns ENDPOINT_HARDWARE_SUPPORT_VOLUME so that it can do this.

This function exists for input and output on many devices.

Perhaps this is a window error?

It is possible to get around this by emulating (scaling) the output, but it is not preferable because it is not functionally identical - it is better to allow the audio interface to do the scaling (especially for input, if it includes a preamp).

+6
c ++ windows audio wasapi audacity
source share
1 answer

The cards you are talking about - for example, RME, simply do not support setting up a wizard or any other level using software, and you cannot handle it. This is not a Windows error. It can be argued that rejecting ENDPOINT_HARDWARE_SUPPORT_VOLUME is an error, but it most likely comes from the driver level, and not from Windows itself.

The only solution I have found so far is to connect the debugger (or add a dll binding) to the software supplied by the vendor and see the DeviceIOControl calls it makes (those that are used to communicate with the equipment), while installing volume in vendor software. It is rather difficult to do this for each individual card, but it is probably worth making a couple of pro-cards. Especially for Audacity, for open source software this is actually not so bad, so I can imagine that some people are really happy if the volume of their card could be installed by him. (while we used exclusively RME Multiface, I spent quite a bit of time figuring out the calls to DeviceIOControl, but in the end it was definitely worth it, because I could set the volume in dB for any point in the matrix)

0
source share

All Articles