hourglass icon indicating copy to clipboard operation
hourglass copied to clipboard

No Sound from Custom Sound Files

Open MasterHowToLearn opened this issue 5 years ago • 9 comments

Hello!

I put some custom sound files (mp3) inside the same folder of Hourglass (portable version 1.10) I can select them in Hourglass but when time is up, no sound comes out. Loud, Normal, Quiet beeps work fine though. Tried all compatibility modes but none worked.

Specs: Laptop Windows 10 Build 17134

Thank you:)

MasterHowToLearn avatar Aug 13 '18 14:08 MasterHowToLearn

Does converting the files to .wav files resolve the issue?

Could you post the sound files (or email them to me if you can't post them here) so I can try to reproduce the problem.

dziemborowicz avatar Aug 13 '18 19:08 dziemborowicz

https://github.com/dziemborowicz/hourglass/issues/143 I just realized I asked (had) the same issue years ago... It's probably Windows' problem...

Thank you for such a prompt reply.

I tried; I could see the wav listed in Hourglass but still no sound. I have already maximized the volume so it's not the volume too low I can't hear.

Thank you:)

MasterHowToLearn avatar Aug 14 '18 01:08 MasterHowToLearn

Hmm. Keeps coming back... Is this the same physical PC? And the same sound files? I'm afraid I don't have a good idea why it wouldn't work.

dziemborowicz avatar Aug 14 '18 03:08 dziemborowicz

Like Hnous927 said, I just started using the portable 1.10 version on Windows 10 (1809) and am having the same issue. I put an MP3 in the folder but nothing plays when selected. I have tried all of these things without success..

Multiple MP3s of different qualities Cutting an MP3 down to 30sec for a smaller file size Changed the file name to have no spaces Moved the entire folder to the root of C:\ so that no spaces were in the path I converted some MP3s to WAV I've tried launching as Administrator Tried setting the EXE to Compatibility mode (Windows 7 & Windows 8)

I would love to get this feature to work, since any other application seems to work fine playing sounds I'm not sure that Microsoft would be willing to diagnose it.

cepacs avatar Jul 25 '19 19:07 cepacs

Under the hood, the relevant .NET Framework code that Hourglass uses relies on Windows Media Player. I've added some code in a commit that hasn't shipped yet to display an error message when initialization of the relevant code fails (f8d9b419e37f0990aafbc2ce81556705da456c76).

Some users have reported success in resolving this issue by uninstalling and reinstalling the Windows Media Player component from Windows settings.

dziemborowicz avatar Jul 25 '19 19:07 dziemborowicz

Thanks for the quick response.. I understand the issue now.. :) With Windows 10 now they don't install the Media Player (program) but instead have the Media Player (App) installed by default, I use VLC so I never thought about that before. I opened control panel and went to Program and Features image Then chose the Media Player from that list.

Now all the MP3 & WAV files I had created are working perfectly.. :)

It will be interesting to see what happens after a Windows feature update if that is removed for the upgrade automatically or not..

Thanks for pointing me in the right direction and making such a great timer application.

cepacs avatar Jul 25 '19 20:07 cepacs

Btw, I similarly had WMP unchecked (due to intentionally disabling it a couple months ago) and some time later had wondered why Hourglass didn't play audio or close the window when expired.

This seems to be another side effect of this, that Hourglass doesn't close the window if the audio can't be played. Was puzzling me until I came across the above post and recalled I'd disabled WMP.

chocmake avatar Nov 14 '19 06:11 chocmake

That's good feedback. I think whenever I actually find time to work on this app again I'll have to replace the code for playing sounds with something that doesn't rely on WMP.

dziemborowicz avatar Nov 14 '19 07:11 dziemborowicz

Replacing the WMP dependency with something like NAudio is probably a good idea. This may also resolve #150.

dziemborowicz avatar Sep 28 '21 08:09 dziemborowicz