aboutsummaryrefslogtreecommitdiff
path: root/include/aomusicplayer.h
blob: 54f3b5f01ffbe44e5a6223de22474152901c87b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef AOMUSICPLAYER_H
#define AOMUSICPLAYER_H

#include "bass.h"
#include "aoapplication.h"

#include <QWidget>
#include <string.h>
#include <QDebug>
#include <QTimer>
#include <QObject>

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);

  void kill_loop();
  QString get_path();

private:
  QWidget *m_parent;
  AOApplication *ao_app;
  QTimer *music_loop_timer;
  int m_volume = 0;
  QString f_path;

  HSTREAM m_stream;

private slots:
  void restart_loop();
};

#endif // AOMUSICPLAYER_H