|
|
@ -19,14 +19,14 @@ const std::tuple<AudibleAlert, QString, bool> sound_list[] = { |
|
|
|
class Sound : public QObject { |
|
|
|
class Sound : public QObject { |
|
|
|
public: |
|
|
|
public: |
|
|
|
explicit Sound(QObject *parent = 0); |
|
|
|
explicit Sound(QObject *parent = 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
void update(); |
|
|
|
void update(); |
|
|
|
void setAlert(const QString &alert_type, AudibleAlert sound); |
|
|
|
void setAlert(const QString &alert_type, AudibleAlert sound); |
|
|
|
|
|
|
|
|
|
|
|
protected: |
|
|
|
|
|
|
|
AudibleAlert current_sound = AudibleAlert::NONE; |
|
|
|
AudibleAlert current_sound = AudibleAlert::NONE; |
|
|
|
QString current_alert_type; |
|
|
|
QString current_alert_type; |
|
|
|
float current_volume = Hardware::MIN_VOLUME; |
|
|
|
float current_volume = Hardware::MIN_VOLUME; |
|
|
|
|
|
|
|
|
|
|
|
QMap<AudibleAlert, QPair<QSoundEffect *, int>> sounds; |
|
|
|
QMap<AudibleAlert, QPair<QSoundEffect *, int>> sounds; |
|
|
|
SubMaster sm; |
|
|
|
SubMaster sm; |
|
|
|
}; |
|
|
|
}; |
|
|
|