atrooney-online-2/aosfxplayer.h
Cerapter 12727fcf7f misc folder given purpose as the 'default' for shouts and chatboxes.
- Default bubbles.
- Default shout sounds.
- Custom chatbox.
- Custom colours for the chatbox.
- No need to have duplicate files of bubbles and shouts all over the
character folders.
2018-09-05 02:07:23 +02:00

30 lines
510 B
C++

#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H
#include "aoapplication.h"
#include <QWidget>
#include <string.h>
#include <QDebug>
#include <QMediaPlayer>
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;
QMediaPlayer *m_sfxplayer;
int m_volume = 0;
};
#endif // AOSFXPLAYER_H