Author Topic: No sound after wake[ Windows]  (Read 126 times)

purenoise

  • Posts: 117
No sound after wake[ Windows]
« on: 12 Oct '21 - 11:15 »
0. Everything was fine, Win10 x64 sent to Sleep[ 8 hours ago]
Today i notice strangest thing:
1. Wake pc, all seems fine, but no sound from two my apps based on BASS
XMPlay not affected, no issue there.
Apps are not muted in the Win sound mixer.
Apps are using default[ -1] sound device and no WASAPI or other plugin_devices
After investigation i discovered
2. Copied app directory to different path, and it works fine.

So it looks like it is the Win issue, but it first one for me, so i
would like to understand, and open for any insights.

I plan on rebooting, and i think it will solve the problem,
but i want to understand first if possible

Thanks.

Ian @ un4seen

  • Administrator
  • Posts: 23991
Re: No sound after wake[ Windows]
« Reply #1 on: 12 Oct '21 - 12:25 »
If moving the app to a different path fixes the problem then that sounds like the app is probably muted in Windows' Volume Mixer, which remembers each app's settings. Are you sure it isn't muted (or set to 0) there? You could try disabling that volume setting remembering for your app via the BASS_CONFIG_WASAPI_PERSIST option:

Code: [Select]
BASS_SetConfig(BASS_CONFIG_WASAPI_PERSIST, 0);

If that doesn't help, what does BASS_GetVolume report, and does BASS_SetVolume make any difference? Also, does using DirectSound instead of WASAPI (via the BASS_DEVICE_DSOUND flag) make any difference?

purenoise

  • Posts: 117
Re: No sound after wake[ Windows]
« Reply #2 on: 16 Oct '21 - 16:33 »
If moving the app to a different path fixes ..

Still not sure what caused this, since i don't use 'Volume Mixer'
manually[ nircmd via autohotkey], but slider was on the '0'[ not mute] for
both apps.

Tested 'BASS_CONFIG_WASAPI_PERSIST', and in my case has no effect, always
restores sound state muted or volume level, confirmed via BASS_GetVolume[ not -1].

Also did some testing and discovered that by using 'BASS_ATTRIB_VOL' for
channel as app volume instead of 'BASS_SetVolume', slider does not move
in 'Volume Mixer' withing it's range like with XMPlay.

So this for now issue is resolved.