trying to add audio implementation

This commit is contained in:
David Skoland 2017-02-10 17:43:19 +01:00
parent 79bf77c925
commit 0fb38b5573
4 changed files with 1092 additions and 2 deletions

View File

@ -37,7 +37,8 @@ SOURCES += main.cpp\
misc_functions.cpp \
aocharmovie.cpp \
aoemotebutton.cpp \
emotes.cpp
emotes.cpp \
aosfxplayer.cpp
HEADERS += lobby.h \
aoimage.h \
@ -57,4 +58,8 @@ HEADERS += lobby.h \
aomovie.h \
misc_functions.h \
aocharmovie.h \
aoemotebutton.h
aoemotebutton.h \
bass.h \
aosfxplayer.h
unix:LIBS += -L/home/omnitroid/lib/bass_linux -lbass

13
aosfxplayer.cpp Normal file
View File

@ -0,0 +1,13 @@
#include "aosfxplayer.h"
#include <string.h>
AOSfxPlayer::AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app)
{
m_parent = parent;
ao_app = p_ao_app;
std::basic_string<char> path = ao_app->get_sounds_path().toStdString() + "sfx-squee.wav";
m_stream = BASS_StreamCreateFile(FALSE, path.c_str(), 0, 0, 0);
}

21
aosfxplayer.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H
#include "bass.h"
#include "aoapplication.h"
#include <QWidget>
class AOSfxPlayer
{
public:
AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
private:
QWidget *m_parent;
AOApplication *ao_app;
HSTREAM m_stream;
};
#endif // AOSFXPLAYER_H

1051
bass.h Normal file

File diff suppressed because it is too large Load Diff