
If you don't want to see this commit on blames, use the hidden whitespace option on GitHub, or use `-w` in git-blame.
63 lines
1.1 KiB
C++
63 lines
1.1 KiB
C++
#ifndef AOMUSICPLAYER_H
|
|
#define AOMUSICPLAYER_H
|
|
|
|
#if defined(BASSAUDIO)
|
|
#include "bass.h"
|
|
#elif defined(QTAUDIO)
|
|
#include <QMediaPlayer>
|
|
#endif
|
|
#include "aoapplication.h"
|
|
|
|
#include <QDebug>
|
|
#include <QWidget>
|
|
#include <string.h>
|
|
|
|
#if defined(BASSAUDIO)
|
|
class AOMusicPlayer {
|
|
public:
|
|
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
|
|
~AOMusicPlayer();
|
|
|
|
void play(QString p_song);
|
|
void set_volume(int p_value);
|
|
|
|
private:
|
|
QWidget *m_parent;
|
|
AOApplication *ao_app;
|
|
|
|
int m_volume = 0;
|
|
HSTREAM m_stream;
|
|
};
|
|
#elif defined(QTAUDIO)
|
|
class AOMusicPlayer {
|
|
public:
|
|
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
|
|
~AOMusicPlayer();
|
|
|
|
void play(QString p_song);
|
|
void set_volume(int p_value);
|
|
|
|
private:
|
|
QMediaPlayer m_player;
|
|
QWidget *m_parent;
|
|
AOApplication *ao_app;
|
|
|
|
int m_volume = 0;
|
|
};
|
|
#else
|
|
class AOMusicPlayer {
|
|
public:
|
|
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
|
|
~AOMusicPlayer();
|
|
|
|
void play(QString p_song);
|
|
void set_volume(int p_value);
|
|
|
|
private:
|
|
QWidget *m_parent;
|
|
AOApplication *ao_app;
|
|
};
|
|
#endif
|
|
|
|
#endif // AOMUSICPLAYER_H
|