mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
e5045860ef
* add a new interface class AudioPlayerInterface; * inherit a new proxy class Ffmpeg::AudioPlayer from it; * partially switch ArlticleView to using the interface; * expose MainWindow's AudioPlayerInterface instance to all ArticleView instances; * add a new AudioPlayerFactory class responsible for creating instances of concrete classes derived from AudioPlayerInterface depending on relevant Config::Preferences values; * increase minimum supported Qt version from 4.5 to 4.6 in README in order to use QScopedPointer introduced in Qt 4.6.
25 lines
587 B
C++
25 lines
587 B
C++
/* This file is (c) 2018 Igor Kushnir <igorkuo@gmail.com>
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
#ifndef AUDIOPLAYERINTERFACE_HH_INCLUDED
|
|
#define AUDIOPLAYERINTERFACE_HH_INCLUDED
|
|
|
|
#include <QScopedPointer>
|
|
#include <QString>
|
|
#include <QObject>
|
|
|
|
class AudioPlayerInterface : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
virtual void play( const char * data, int size ) = 0;
|
|
virtual void stop() = 0;
|
|
|
|
signals:
|
|
void error( QString message );
|
|
};
|
|
|
|
typedef QScopedPointer< AudioPlayerInterface > AudioPlayerPtr;
|
|
|
|
#endif // AUDIOPLAYERINTERFACE_HH_INCLUDED
|