/** * @file sound_engine.h * @ingroup Core * @brief TODO: Document this. */ #ifndef SOUNDENGINE_H #define SOUNDENGINE_H #include #include #include #include #include #include inline Q_LOGGING_CATEGORY(SoundEngineLog, "sound_engine"); class QBuffer; typedef QMap QStringMap; class SoundEngine : public QObject { Q_OBJECT public: explicit SoundEngine(QObject *parent = nullptr); ~SoundEngine() override; void playSound(const QString &fileName); QStringMap &getAvailableThemes(); private: QStringMap availableThemes; QMap audioData; QAudioOutput *audioOutput; QMediaPlayer *player; protected: void ensureThemeDirectoryExists(); private slots: void soundEnabledChanged(); void themeChangedSlot(); public slots: void testSound(); }; extern SoundEngine *soundEngine; #endif