27 mLastPlayTime = QDateTime::fromMSecsSinceEpoch(0);
28 mMinTimeBetweenEachSound = 500;
37 bool AudioInternal::checkValidTime()
39 QDateTime now = QDateTime::currentDateTime();
41 QMutexLocker sentry(&mLastPlayTimeMutex);
42 bool valid = mLastPlayTime.msecsTo(now) > mMinTimeBetweenEachSound;
49 void AudioInternal::playSoundSlot(QString file)
51 if (!this->checkValidTime())
54 if (!QFileInfo(file).isAbsolute())
57 if (!QFileInfo(file).exists())
59 QString text = QString(
"Audio file %1 not found").arg(file);
82 mInternal->playSound(
"Windows XP Hardware Insert.wav");
87 mInternal->playSound(
"Windows XP Hardware Remove.wav");
92 mInternal->playSound(
"Windows XP Hardware Fail.wav");
97 mInternal->playSound(
"Windows XP Print complete.wav");
102 mInternal->playSound(
"Windows XP Navigation.wav");
107 mInternal->playSound(
"Windows XP Critical Stop.wav");
112 mInternal->playSound(
"camera_shutter.wav");
117 mInternal->playSound(
"Windows XP Information Bar.wav");
virtual void playCancelSound()
void playSound(QString file)
virtual void playScreenShotSound()
AudioInternal(QObject *parent=NULL)
virtual void playStopSound()
virtual void playSuccessSound()
static QString findConfigFolder(QString pathRelativeToConfigRoot, QString alternativeAbsolutePath="")
virtual void playSampleSound()
void playSoundInternalSignal(QString file)
virtual void playWarningSound()
virtual void playStartSound()
virtual void playErrorSound()
Namespace for all CustusX production code.