Changed media player to initialize in boot.
[jspeed] / src / mediaplayer.h
index 2bba0ec..9a9e376 100644 (file)
 #include <QtCore/QString>
 #include <QtCore/QStringList>
 #include <QtCore/QList>
-#include <QMediaPlayer>
+
+class QMediaPlayer;
 
 class MediaPlayer
 {
 public:
     enum Format {MP3, WAV, AAC, FORMAT_COUNT};
+    static void init();
     static bool play(QString const& file);
     static void getSupportedFormats(QList<QString>& formats);
     static QString getFormatPattern();
@@ -36,7 +38,7 @@ public:
     static QString const& getLocalSoundDir();
 
 private:
-    static QMediaPlayer player_;
+    static QMediaPlayer* getPlayer();
 };
 
 #endif