atrooney-online-2/include/aosfxplayer.h
oldmud0 156a760eba Full revert to tag 2.6.2
Due to a countless number of changes made to the core that were not
fully understood, tested, or documented, it was decided to roll
everything back to the last known stable version (2.6.2).

Changes dropped include:
 - Witness needed
 - Shake
 - Frame SFX
 - Multiple custom objections
 - Multithreaded thumbnail generation
 - Looping
 - Various translation additions
 - "Mirror IC"
 - Color in IC log
 - An invocation of clang-format

Next time, work together and split your big fork into independently
testable feature branches.
2020-05-22 17:02:32 -05:00

37 lines
635 B
C++

#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H
#if defined(BASSAUDIO)
#include "bass.h"
#elif defined(QTAUDIO)
#include <QSoundEffect>
#endif
#include "aoapplication.h"
#include <QWidget>
#include <string.h>
#include <QDebug>
class AOSfxPlayer
{
public:
AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
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;
#if defined(BASSAUDIO)
HSTREAM m_stream;
#elif defined(QTAUDIO)
QSoundEffect m_sfx;
#endif
int m_volume = 0;
};
#endif // AOSFXPLAYER_H