dziemborowicz/hourglass

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

Opened this issue · 2 comments

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

--sound none|last|<sound>

Within a timer's menu are the sound options:

  • no sound
  • loud beep
  • normal beep
  • quiet beep
  • loop sound

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

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

  • 'none'
  • "Loud Beep"
  • "Normal Beep"
  • "Quiet Beep"
    Case insensitive.
    [Sadly, the names contain spaces. Windows bat files just munge quotes, making parameters with spaces in them hard.]

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<name>.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.

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