48 mLastPlayTime = QDateTime::fromMSecsSinceEpoch(0);
49 mMinTimeBetweenEachSound = 500;
58 bool AudioInternal::checkValidTime()
60 QDateTime now = QDateTime::currentDateTime();
62 QMutexLocker sentry(&mLastPlayTimeMutex);
63 bool valid = mLastPlayTime.msecsTo(now) > mMinTimeBetweenEachSound;
70 void AudioInternal::playSoundSlot(QString file)
72 if (!this->checkValidTime())
75 if (!QFileInfo(file).isAbsolute())
78 if (!QFileInfo(file).exists())
80 QString text = QString(
"Audio file %1 not found").arg(file);
103 mInternal->playSound(
"Windows XP Hardware Insert.wav");
108 mInternal->playSound(
"Windows XP Hardware Remove.wav");
113 mInternal->playSound(
"Windows XP Hardware Fail.wav");
118 mInternal->playSound(
"Windows XP Print complete.wav");
123 mInternal->playSound(
"Windows XP Navigation.wav");
128 mInternal->playSound(
"Windows XP Critical Stop.wav");
133 mInternal->playSound(
"camera_shutter.wav");
138 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()