
* Allow changing audio device on the fly while in a server * Use default audio device if device in config doesn't exist * Automatically change audio device to default when current one is invalid * Destroy Qt Multimedia support It was decided that there was not enough attention being given to Qt Multimedia support to justify its continued maintenance simply as a libre alternative to BASS. While substantial changes to audio were being made in 2.8, the Qt Multimedia support code fell behind in disrepair. It's clear that there is no vested interest in implementing audio features twice for the sake of licensing. When it's time to switch to another audio library, it will be done unilaterally. * CI: Use BASS for Linux build Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
38 lines
624 B
C++
38 lines
624 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:
|
|
const int max_blip_ms = 60;
|
|
|
|
QWidget *m_parent;
|
|
AOApplication *ao_app;
|
|
qreal m_volume;
|
|
QElapsedTimer delay;
|
|
|
|
void set_volume_internal(qreal p_volume);
|
|
|
|
HSTREAM m_stream_list[5];
|
|
};
|
|
|
|
#endif // AOBLIPPLAYER_H
|