fix audio
This commit is contained in:
parent
cb1ed6d60d
commit
c8b11b398a
@ -6,6 +6,7 @@
|
||||
#elif defined(QTAUDIO)
|
||||
#include <QMediaPlayer>
|
||||
#endif
|
||||
|
||||
#include "aoapplication.h"
|
||||
|
||||
#include <QWidget>
|
||||
@ -14,12 +15,14 @@
|
||||
#include <QTimer>
|
||||
#include <QObject>
|
||||
|
||||
#if defined(BASSAUDIO)
|
||||
class AOMusicPlayer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
|
||||
virtual ~AOMusicPlayer();
|
||||
|
||||
void play(QString p_song);
|
||||
void set_volume(int p_value);
|
||||
|
||||
@ -30,6 +33,7 @@ public:
|
||||
private:
|
||||
QWidget *m_parent;
|
||||
AOApplication *ao_app;
|
||||
|
||||
int m_volume = 0;
|
||||
QString f_path;
|
||||
|
||||
@ -46,12 +50,18 @@ public:
|
||||
void play(QString p_song);
|
||||
void set_volume(int p_value);
|
||||
|
||||
void kill_loop();
|
||||
QString get_path();
|
||||
bool enable_looping = true;
|
||||
|
||||
private:
|
||||
QMediaPlayer m_player;
|
||||
QWidget *m_parent;
|
||||
AOApplication *ao_app;
|
||||
|
||||
QMediaPlayer m_player;
|
||||
|
||||
int m_volume = 0;
|
||||
QString f_path;
|
||||
};
|
||||
#else
|
||||
class AOMusicPlayer : public QObject
|
||||
@ -63,9 +73,16 @@ public:
|
||||
void play(QString p_song);
|
||||
void set_volume(int p_value);
|
||||
|
||||
void kill_loop();
|
||||
QString get_path();
|
||||
bool enable_looping = true;
|
||||
|
||||
private:
|
||||
QWidget *m_parent;
|
||||
AOApplication *ao_app;
|
||||
|
||||
int m_volume = 0;
|
||||
QString f_path;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user