diff options
| author | stonedDiscord <stoned@derpymail.org> | 2020-02-23 13:53:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-23 13:53:44 +0100 |
| commit | 149f04dc8465332363eeca9a40e123fc25863a17 (patch) | |
| tree | ad1bfae38670defee3357ee5a80639485e5f142d /include/aomusicplayer.h | |
| parent | 6ccabdd568075dfcecc6190d8d41a50b8bd99b84 (diff) | |
| parent | ad80e6413f7bc81177605c125eaf9c408aac94c6 (diff) | |
Merge pull request #117 from AttorneyOnline/2.7
2.7
Diffstat (limited to 'include/aomusicplayer.h')
| -rw-r--r-- | include/aomusicplayer.h | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index b34267c..255cc45 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -6,31 +6,42 @@ #elif defined(QTAUDIO) #include <QMediaPlayer> #endif + #include "aoapplication.h" #include <QWidget> #include <string.h> #include <QDebug> +#include <QTimer> +#include <QObject> #if defined(BASSAUDIO) -class AOMusicPlayer +class AOMusicPlayer : public QObject { + Q_OBJECT public: AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app); - ~AOMusicPlayer(); + virtual ~AOMusicPlayer(); 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; + HSTREAM m_stream; + }; #elif defined(QTAUDIO) -class AOMusicPlayer +class AOMusicPlayer : public QObject { public: AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app); @@ -39,15 +50,21 @@ 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 +class AOMusicPlayer : public QObject { public: AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app); @@ -56,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 |
