-
Notifications
You must be signed in to change notification settings - Fork 25
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
ActGlobals.oFormActMain.TTS does not reset audio volume #60
Comments
The real problem is that the WMP API is the thing that is changing the mixer volume. When I started using it, I thought it had an internal mixer and did not realize it modified the Windows mixer for the host program. This should have the side effect of changing the volume of one sound mid-way through if the types change. Obviously this isn't great. I'm suspicious that this reported issue is also related to how WMP alters the Windows Mixer and does it haphazardly. Other sound APIs do not change the host process mixer volume. I imagine using TTS in SAPI direct mode should not have this bug occur because WMP will no longer be called for TTS at all. |
I think this bug wouldn't happen in SAPI mode regardless because of this: if (pszSound.EndsWith("sapi.wav"))
this.PlaySoundMethod(pszSound, this.opSound.tbarTtsVol.Value);
else
this.PlaySoundMethod(pszSound, this.opSound.tbarWavVol.Value); If this works how I think it does, TTS is supposed to set the volume to the selected TTS volume setting, but this code path is only used when playing TTS via SAPI? |
Direct SAPI does not use |
This and other problems would be fixed if ACT no longer used WMP as the default sound engine. ACT does not change the volume mixer, the WMP API does. WMP API was attractive because it was preinstalled on every version of Windows. There may be newer options that are similarly ubiquitous, but I would have to do a bit of research. |
ActGlobals.oFormActMain.TTS("something")
, observe it is at full volumeActGlobals.oFormActMain.PlaySound("some_file.wav")
, observe it has the correct reduced volumeThis also happens if you call
ActGlobals.oFormActMain.PlaySoundMethod(file, volume)
, and the issue persists until you either go into volume mixer and reset the level manually, or you call PlaySoundMethod with a new volume level.Reading through PlaySound, the if statement involving "sapi.wav" makes it seem like this should work.
The text was updated successfully, but these errors were encountered: