dziemborowicz / hourglass

The simple countdown timer for Windows.
MIT License
640 stars 114 forks source link

Any '--sound <internal file>' parameters? #246

Open bs27975 opened 1 year ago

bs27975 commented 1 year ago

https://chris.dziemborowicz.com/apps/hourglass/#command-line-arguments notes:

--sound none|last|\<sound>

Within a timer's menu are the sound options:

Are there any valid values for the 'internal' sounds for the --sound parameter, such as: loud, normal, or quiet?

bs27975 commented 1 year ago

Looking in the code, the options (sound names) are exactly those:

Experimenting showed other names match the filename stems of the sound files present within the given directory. e.g. Alarm01.wav is referred to by name in the parameters as 'Alarm01'.

In that experimentation, hint for users, native (Windows) OS sounds [in C:\Windows\Media directory) can be 'enabled' by going to installation directory [e.g. \Program Files (x86)\Hourglass] and running 'mklink C:\Windows\Media\.wav'.

Would be useful if all of the above could be incorporated into Usage() and corresponding FAQ (custom sounds) and command line argument web pages.

i2van commented 8 months ago

Fixed in the modified Hourglass:

  --sound none|last|<sound>
        Plays a sound when the timer expires.

        Required        no
        Default value   last
        Alias           -s, /s

        <sound> is the name of a sound file without extension. The sound file
        should be placed to the application directory or to the
        "%LOCALAPPDATA%\Hourglass" directory or to the "Sounds" subdirectory.
        It can be the symbolic link created by the "mklink" system command.

        The sound file supported extensions are:

            .aac
            .m4a
            .mid
            .midi
            .mp3
            .wav
            .wma