#ifndef NOTIFICATIONAUDIO_H #define NOTIFICATIONAUDIO_H #include #include #include #include #include #include #include #include "AudioDevice.hpp" #include "AudioDecoder.h" #include "WaveFile.h" #include "soundout.h" class NotificationAudio : public QObject { Q_OBJECT public: NotificationAudio(QObject * parent=nullptr); ~NotificationAudio(); public slots: void setDevice(const QAudioDeviceInfo &device, unsigned channels, unsigned msBuffer=0); void play(const QString &filePath); void stop(); private: QPointer m_stream; QPointer m_decoder; QPointer m_file; QAudioDeviceInfo m_device; unsigned m_channels; unsigned m_msBuffer; }; #endif // NOTIFICATIONAUDIO_H