ScanTailor-Advanced / scantailor-advanced

ScanTailor Advanced is the version that merges the features of the ScanTailor Featured and ScanTailor Enhanced versions, brings new ones and fixes.
GNU General Public License v3.0
194 stars 8 forks source link

Feature request: "Beep when finished" alternate audio channel. #22

Open mrelg opened 2 years ago

mrelg commented 2 years ago

Currently "Beep when finished" option outputs to the "System Sounds" audio channel. Allow for ScanTailor to output to its own media audio channel.

This is useful for people who don't like Windows randomly beeping at them (and hence keep "System Sounds" turned down), but would still like audible notification from ScanTaylor.

ghost commented 1 year ago

Code responsible for this: https://github.com/vigri/scantailor-advanced/blob/7dc3c1660dff01f395493dc80b7dc224c324bae7/src/app/MainWindow.cpp#L1217

      if (m_checkBeepWhenFinished()) {
#if defined(Q_OS_UNIX)
        QString extPlayCmd("play /usr/share/sounds/freedesktop/stereo/bell.oga");
#else
        QString extPlayCmd;
#endif
        QSettings settings;
        QString cmd = settings.value("main_window/external_alarm_cmd", extPlayCmd).toString();
        if (cmd.isEmpty()) {
          QApplication::beep();
        } else {
          Q_UNUSED(std::system(cmd.toStdString().c_str()));
        }
      }

It seems that the beep feature just calls the Qt library to beep, there is probably a way to implement what you say.