aboutsummaryrefslogtreecommitdiff
path: root/aosfxplayer.h
blob: ab398e0cf116cc805abb15c39485f6a24a0e4904 (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
#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H

#include "aoapplication.h"

#include <QWidget>
#include <string.h>
#include <QDebug>
#include <QSoundEffect>

class AOSfxPlayer
{
public:
  AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
  ~AOSfxPlayer();

  void play(QString p_sfx, QString p_char = "", QString shout = "");
  void stop();
  void set_volume(int p_volume);

private:
  QWidget *m_parent;
  AOApplication *ao_app;
  QSoundEffect *m_sfxplayer;

  int m_volume = 0;
};

#endif // AOSFXPLAYER_H