Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Volume adjusting not working on certain games (Call of Duty: Modern Warfare III and DOTA 2) #128

Open
z500 opened this issue Nov 13, 2023 · 18 comments
Assignees
Labels
bug Something isn't working cannot-replicate We're unable to replicate the issue triage Marks issues that were created with an issue template

Comments

@z500
Copy link

z500 commented Nov 13, 2023

Version Number

6.6.1

File

Installer (VolumeControl-Installer.exe), Portable (VolumeControl.exe)

Windows Version

Windows 11 Version 22H2

Actual Behaviour

When adjusting the volume of Call of Duty: Modern Warfare III and DOTA 2 on VolumeControl.exe, the game volume is not changed. Adjusting the volume of these applications through the Windows 11 Volume Mixer actually changes the volume. Even muting ALL applications through the VolumeControl volume mixer does not affect the volume of both games.

Expected Behaviour

The volume of Call of Duty: Modern Warfare III and DOTA 2 should be changed when manually adjusted on VolumeControl's mixer.

Reproduction Steps

  1. Open the mixer tab on VolumeControl.exe
  2. Adjust the volume of DOTA 2 or Call of Duty: Modern Warfare III
  3. Listen to see if the game volume is affected or not

Log

No response

@z500 z500 added bug Something isn't working triage Marks issues that were created with an issue template labels Nov 13, 2023
@radj307
Copy link
Owner

radj307 commented Nov 13, 2023

You can try running the application as administrator, but that may or may not help.

I'll look into it.

@z500
Copy link
Author

z500 commented Nov 13, 2023

I tried running as administrator with no luck unfortunately.

@radj307
Copy link
Owner

radj307 commented Nov 13, 2023

Can you try using EarTrumpet to adjust the volume of Dota 2/MW3 & let me know if it works?

It uses the same APIs for adjusting session volume, so should help with determining the cause.

I suspect that these games are doing something that is interfering with the Core Audio API's ability to change their volume externally, but it's also possible that there's just some bug in Volume Control causing it to fail in specific cases. Knowing whether EarTrumpet suffers from the same bug would confirm or deny this.

SndVol.exe (windows volume mixer) is really quite opaque so reproducing whatever black magic it uses is basically impossible.

@z500
Copy link
Author

z500 commented Nov 14, 2023

I tested EarTrumpet and can confirm that EarTrumpet successfully adjusted the volume of Call of Duty: Modern Warfare III. I haven't tested DOTA 2.

I noticed that on EarTrumpet the game was listed as "Call of Duty HQ," where as on VolumeControl it was listed as "cod." I'm not sure if this is related to the potential solution.

I much prefer the layout and seamless controls of VolumeControl. I hope you can get this fixed soon. Thanks!

@radj307
Copy link
Owner

radj307 commented Nov 14, 2023

That confirms that there is a bug somewhere in Volume Control or the CoreAudio nuget package.

I'm working on it, but this will probably take some time.

@radj307 radj307 added the cannot-replicate We're unable to replicate the issue label Nov 16, 2023
@radj307
Copy link
Owner

radj307 commented Nov 16, 2023

I'm unable to reproduce the problem with Dota 2 using v6.6.2 on Windows 10 Enterprise LTSC 21H2. Will try on a Windows 11 VM and report back.

@z500
Copy link
Author

z500 commented Nov 16, 2023

Thanks for the update. It might be possible to replicate the issue with Call of Duty. It’s difficult to reproduce with Call of Duty: Modern Warfare III since you might not own it but you could try Call of Duty: Warzone which uses the exact same process and launcher. Hopefully this helps.

I haven’t tried DOTA 2 in a while but the issue is persistent on Call of Duty. Thanks again.

@radj307 radj307 removed the cannot-replicate We're unable to replicate the issue label Nov 16, 2023
@z500
Copy link
Author

z500 commented Nov 17, 2023

Hello,

Are there any updates on the testing with COD: Warzone? I appreciate the help. Thanks!

@radj307
Copy link
Owner

radj307 commented Nov 17, 2023

Was unable to start it on my VM, not super surprising considering its a VM, but still disappointing as I won't be able to test it on W11. I'm installing it on my main machine today to test it on W10.

@radj307
Copy link
Owner

radj307 commented Nov 17, 2023

I was unable to reproduce the issue on my machine. Played through a match of I think it was called DMZ (the one with the bots, radiation, and open mic users), and was able to adjust the game volume with hotkeys/GUI throughout. This may have something to do with Windows 11, but I'm not sure what that is yet.

@radj307 radj307 added the cannot-replicate We're unable to replicate the issue label Nov 17, 2023
@radj307
Copy link
Owner

radj307 commented Nov 18, 2023

I suspect the problem may be something to do with the library that Volume Control uses for the Core Audio API, morphx666/CoreAudio. Eartrumpet implements the P/Invoke types for the API manually while VC uses the aforementioned package to implement them, and that's the only real difference between them. At least when it comes to adjusting application volumes.

If you're able to reproduce the problem while being tabbed out from the game, try using Volume Control CLI to adjust the volume instead. It's a commandline version written in C++, so it uses the Core Audio API directly, rather than by proxy. Regardless of whether that works or not, either way it'll narrow down the problem a lot.

@z500
Copy link
Author

z500 commented Nov 18, 2023

I'll give Volume Control CLI a try and report back.

@z500
Copy link
Author

z500 commented Nov 18, 2023

Okay, after testing with the Volume Control CLI, it indeed has worked properly. I was able to adjust the volume of Call of Duty: MWIII. The weird thing is, I tested the Volume Control executable and it worked flawlessly after.. I'm not sure if installing the Volume Control CLI has anything to do with the fix. This is very weird.

@radj307
Copy link
Owner

radj307 commented Nov 19, 2023

Well that's certainly unexpected. vccli doesn't change anything on your system when it's installed, it's a one-shot program that just does its thing & exits. Seems like VC's current approach isn't opening something properly & that's why vccli "unsticks" it.

It'll take more research to figure out what that could be though, which may take a while.

@radj307
Copy link
Owner

radj307 commented Nov 21, 2023

I have another thing for you to test. I whipped up a quick & dirty clone of vccli written in C# using the same CoreAudio nuget package that Volume Control uses. It can set the volume or mute state of devices (by their "friendly name") & sessions (by their process name or process ID).

VolumeControl-SetAudioTest.zip

Syntax is VolumeControl-SetAudioTest -v 50 <MW3>, where <MW3> can be the name or ID of the MW3 process.

Here's what we can find out from whether this works or not:

  1. it works:
    The problem is in Volume Control's usage of the CoreAudio nuget package.
    1. it works, & has the same "unsticking" effect as vccli:
      The problem has to do with Volume Control & the CoreAudio nuget package's management of COM interfaces.
  2. it doesn't work:
    The problem is in the CoreAudio nuget package's implementation of the Win32 Core Audio APIs.

I expect outcome 2, where it doesn't work at all. If that's the case, I'll use a different implementation of the Win32 Core Audio APIs & that should fix the problem.

@z500
Copy link
Author

z500 commented Nov 23, 2023

I’ll give it a try when I get the opportunity. I’ve been away from my setup the past few days. I’ll get back to you once I give it a try.

@radj307
Copy link
Owner

radj307 commented Dec 13, 2023

@nospaulatu
Copy link

Hello,
I originally reported having this same issue in Little Nightmares. I have since encountered the issue in several games, including Little Nightmares 2, Stray, and most recently This Bed We Made. I did a little further digging today and I found what I think might be some useful info as to why the issue is occurring, and why it may not be affecting everyone.

I have 2 active sound devices on my PC; the built-in Realtek speaker output on my motherboard, and a USB audio interface which I use as a microphone interface but also provides an audio output device. The Realtek is set to my default device in Windows 10.

In the affected games, when I change the volume using Volume Control, there is no change to the output volume, and the Windows Mixer shows no changes. However, when I click on a different Device in the Windows Mixer to see the volume sliders for my USB interface, I see the volume is being changed there, despite no audio being output by the application to that device.

While having the Realtek device selected in Windows Mixer, I am able to change the volume of these games there.

I did also notice that when using the RetroArch emulator and changing the output device within the emulator settings, Volume Control was no longer able to change the volume for the application until I closed and relaunched RetroArch.

The name of the audio devices are "Speakers" (Realtek(R) Audio) and "M-Audio Speaker" (2- USB AUDIO CODEC). I tried renaming M-Audio to Z-Audio and relaunching Volume Control, hoping that perhaps Volume Control was grabbing the first audio device in alphabetical order, but that did not change the behaviour; it was still changing the volume for the USB device only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cannot-replicate We're unable to replicate the issue triage Marks issues that were created with an issue template
Projects
None yet
Development

No branches or pull requests

3 participants