Hi, sometimes when jumping between my application window (3d) and others the volume level will jump to the max. I logged out all calls made to FSOUND_Set_Volume and FSOUND_SetSFXMasterVolume and nothing fishy was going on there. Just wondering if anyone has experienced something similar because it’s hard to debug when it happens so randomly.
- atli asked 15 years ago
Thanks for your reply Brett, only got a chance to test this again today and setting winmm as the output mode fixed it. Only using winmm is however not an option for me.
I managed to narrow the cause down. Whenever a sound is started with the application window not in the foreground (in most cases with FSOUND_LOADMEMORY | FSOUND_HW2D) it does not play (that is to say it is not heard, it does however start) until the window comes to the foreground again and then on full blast. Not being heard with the window in foreground is fine but the volume is not. I could check on every tick whether the channel volume agrees with what it should be but it seems like overkill. Any ideas?
I tried the overkill method I was talking about and it didn’t work. FMOD thinks the volume on the channel is correct. I even tried setting it on every tick but nothing happens until I nudge the volume a little (increase or decrease by one). I assume that FSOUND_SetVolume runs FMOD_GetVolume and checks for difference before actually changin the volume on the channel.
So in effect I am utterly stuck, my only way out is some horrendous hack of noticing the window state and then nudging the volume.
Has noone ever run into this before?
Please login first to submit.