atrooney-online-2/include/aoblipplayer.h
Crystalwarrior d00d0769a9 Lots of blip rate fixes:
Remove qElapsedTimer method of blip earrape protection due to major inconsistency issues with this method (the same message would produce wildly different blip sounds - consistency is preferred)
More sophisticated blip earrape prevention is calculated in the chat ticker function itself, it also properly adjusts itself depending on the blip_rate used.
2020-09-11 23:38:36 +03:00

35 lines
570 B
C++

#ifndef AOBLIPPLAYER_H
#define AOBLIPPLAYER_H
#include "bass.h"
#include "bassopus.h"
#include "aoapplication.h"
#include <QDebug>
#include <QElapsedTimer>
#include <QWidget>
#include <string.h>
class AOBlipPlayer {
public:
AOBlipPlayer(QWidget *parent, AOApplication *p_ao_app);
void set_blips(QString p_sfx);
void blip_tick();
void set_volume(int p_volume);
int m_cycle = 0;
private:
QWidget *m_parent;
AOApplication *ao_app;
qreal m_volume;
void set_volume_internal(qreal p_volume);
HSTREAM m_stream_list[5];
};
#endif // AOBLIPPLAYER_H