While stumbling about in the code I came across this in srcwidgetsProgressDialog.cpp:
void
ProgressDialog::Beep()
{
int after;
bool should;
wxString name;
gPrefs->Read(wxT("/GUI/BeepOnCompletion"), &should, false);
gPrefs->Read(wxT("/GUI/BeepAfterDuration"), &after, 60);
gPrefs->Read(wxT("/GUI/BeepFileName"), &name, wxEmptyString);
if (should && wxGetLocalTimeMillis().GetValue() - mStartTime > after * 1000)
{
wxBusyCursor busy;
wxSound s;
if (name.IsEmpty()) {
s.Create(sizeof(beep), beep);
}
else {
s.Create(name);
}
if (s.IsOk())
{
s.Play(wxSOUND_SYNC);
}
}
}
Just to try it out I used Audacity to record “export multiple has completed successfully” with my microphone and then saved it as a WAV file. At first, I just copied this code and the data that " beep" entails and ran it without a sound file just to hear what the beep sounded like – it was an almost instantaneous chirp; this was not adequate so I made it chirp five times– this was okay but the volume was less than useful. Next I tried it with my WAV file, it worked perfectly!
Unfortunately, this relies on a member variable which is specific to this ProgressDialog, and no other dialogs seem to have it – a minor hassle. The real problem is that only BeepOnCompletion is exposed to the user (via Preferences); neither BeepAfterDuration nor BeepFileName are exposed and can only be manipulated by using a text editor on the configuration file.