/* This file is (c) 2018 Igor Kushnir * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */ #ifndef MULTIMEDIAAUDIOPLAYER_HH_INCLUDED #define MULTIMEDIAAUDIOPLAYER_HH_INCLUDED #ifdef MAKE_QTMULTIMEDIA_PLAYER #include #include #include "audioplayerinterface.hh" #if ( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) ) #include #endif #include class MultimediaAudioPlayer: public AudioPlayerInterface { Q_OBJECT public: MultimediaAudioPlayer(); virtual QString play( const char * data, int size ); virtual void stop(); private slots: void onMediaPlayerError(); private: QPointer< QBuffer > audioBuffer; QMediaPlayer player; ///< Depends on audioBuffer. #if ( QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) ) QAudioOutput audioOutput; #endif }; #endif // MAKE_QTMULTIMEDIA_PLAYER #endif // MULTIMEDIAAUDIOPLAYER_HH_INCLUDED