Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
312 stars 134 forks source link

The sound of timers does not work in windows 10 64-bit, version 2.3.0 #647

Closed Jazzbeerman closed 1 year ago

Jazzbeerman commented 2 years ago

Hello! Before I describe the problem, let me thank you for a great program that allows many people in the world to make beer! Now, the actual description of the problem: The timer refuses to play a sound when it ends. It is noticed that there is no difference even when run with administrator rights. Tested on two laptops. I left the timer window active, went to the desktop (curtailed the application), there is no difference, the numbers go to zero, but there is no sound. By the way, if the timer window is not actively selected, then when it reaches zero, the numbers on the timer screen do not blink. Regards.

mattiasmaahl commented 2 years ago

Thank you for your comment, will look into it later this week, will revert to you on the matter.

Jazzbeerman commented 2 years ago

Hey! Just a little reminder of myself))

matty0ung commented 2 years ago

Does it have the same problem if you choose a different alarm sound? (Click "Add Timer" to show "Addition Timers" then click the musical note to the right of the timer in this new window to choose a sound file.)

ugcasa commented 2 years ago

No sound in Linux Mint 5.4.0-120-generic x86_64 with Brewtarget v.2.3.1. Timer gets to then end and numbers blinks, but no sound. Tried to change alarm sound (brewtarget's own ogg) with same result.

matty0ung commented 2 years ago

Ah, that's interesting. Thought it was only a Windows problem. If you get time, would you be able to try with the latest build? Brewtarget 2.3.1 is pretty old now. (I know we need to do another release by the way. It's on the list!)

Jazzbeerman commented 2 years ago

Does it have the same problem if you choose a different alarm sound? (Click "Add Timer" to show "Addition Timers" then click the musical note to the right of the timer in this new window to choose a sound file.)

No sound works on win10 on two laptops and one PC. The problem is similar to user ugcasa. The numbers are flashing, but there is no sound. Perhaps the case is true in windows, it may be necessary to give some permissions manually. But by default, the program did not prohibit anything. Installed 'as is'.

matty0ung commented 2 years ago

OK, thanks for the info. I had a quick look at the source code. It's a bit short on diagnostics. I'll add some in (hopefully over this weekend) so we can see whether Qt is getting some error from the operating system when it tries to play the sound. There is also this https://stackoverflow.com/questions/44075476/qmediaplayer-no-sound which may be related, so we could try the same fix.

matty0ung commented 2 years ago

Hi folks, I've done some code changes that might make things better and, if not, might give us some useful diagnostic clues. I noticed on Linux that there is sometimes a significant delay before the timer sound is played. I've changed the way sounds are played to address this. I've also added a "play alarm sound now" button so you can test the sound without waiting for the alarms to go off. You'll need to download the latest build (for Windows it's from https://github.com/Brewtarget/brewtarget/actions/workflows/windows.yml) to try out the fix. Let me know how you get on.

matty0ung commented 1 year ago

I think/hope this should be working in the 3.0.0 release, which is now available. (Sounds work OK on both my Linux and my Windows install of Brewtarget.) If you still have problems with sounds after upgrading to 3.0.0, please do reopen this ticket.