summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelik Houij <houijmelik08@protonmail.com>2022-05-14 23:25:32 +0200
committerMelik Houij <houijmelik08@protonmail.com>2022-05-14 23:25:32 +0200
commit83723def5aeee98747e3999dfda7c361446a6f24 (patch)
treef88e74c7f00c9ddd71855dbed46de02dfcc9958d
parent0afbbb590853b82278db4af3cf88a34c43e283ca (diff)
IT WORKSirrklang-int
-rwxr-xr-xlib/glad.o (renamed from glad.o)bin105768 -> 105768 bytes
-rw-r--r--lib/libIrrKlang.sobin0 -> 554512 bytes
-rw-r--r--main.cpp5
-rw-r--r--resources/bleep.mp3bin0 -> 42240 bytes
4 files changed, 5 insertions, 0 deletions
diff --git a/glad.o b/lib/glad.o
index 61ab6f7..61ab6f7 100755
--- a/glad.o
+++ b/lib/glad.o
Binary files differ
diff --git a/lib/libIrrKlang.so b/lib/libIrrKlang.so
new file mode 100644
index 0000000..8637f65
--- /dev/null
+++ b/lib/libIrrKlang.so
Binary files differ
diff --git a/main.cpp b/main.cpp
index dee75c6..56429d9 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1,5 +1,6 @@
#include <glad/glad.h>
#include <GLFW/glfw3.h>
+#include <irrklang/irrKlang.h>
#include <iostream>
#include "shader.h"
@@ -12,6 +13,8 @@
#include <unistd.h>
#endif
+irrklang::ISoundEngine *soundEngine = irrklang::createIrrKlangDevice();
+
int SCR_WIDTH = 600;
int SCR_HEIGHT = 400;
int targetFps = 20;
@@ -95,6 +98,8 @@ int main()
ball.addAnim("resources/sprite1.png", 10, VAO, 4);
ball.addAnim("resources/grass.png", 10, VAO, 2);
+ soundEngine->play2D("resources/test.wav");
+
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
diff --git a/resources/bleep.mp3 b/resources/bleep.mp3
new file mode 100644
index 0000000..7e1d820
--- /dev/null
+++ b/resources/bleep.mp3
Binary files differ