From 8fe4e980bd10f239b8eef7aa8644bd77cb664350 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Wed, 3 May 2023 18:07:59 +0200 Subject: [PATCH] Add audio (don't listen to it) --- Makefile | 2 +- audio/README.md | 1 + audio/ambiance.mid | 3 +++ main.c | 6 +++--- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 audio/README.md create mode 100644 audio/ambiance.mid diff --git a/Makefile b/Makefile index e33fdf8..3259165 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ MSVCSRC = $(patsubst %,,$(SOURCES)) OBJ = $(SOURCES:.c=.o) DOXYFILE = documentation/Doxyfile VSCFILES = $(PROGNAME).vcxproj $(PROGNAME).sln -EXTRAFILES = COPYING $(wildcard shaders/*.?s images/*.png fonts/*.ttf) $(VSCFILES) +EXTRAFILES = COPYING $(wildcard shaders/*.?s images/*.png fonts/*.ttf audio/*.mid) $(VSCFILES) DISTFILES = $(SOURCES) Makefile $(HEADERS) $(DOXYFILE) $(EXTRAFILES) # API 8 diff --git a/audio/README.md b/audio/README.md new file mode 100644 index 0000000..1ef9e78 --- /dev/null +++ b/audio/README.md @@ -0,0 +1 @@ +Son généré via Beepbox : https://tinyurl.com/2n5f8gmp diff --git a/audio/ambiance.mid b/audio/ambiance.mid new file mode 100644 index 0000000..031899a --- /dev/null +++ b/audio/ambiance.mid @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfdc25112a8e28743708145d225c68cf6a024d873fe1329ede3e1d929c01f71c +size 10970 diff --git a/main.c b/main.c index e088b3b..407c34b 100644 --- a/main.c +++ b/main.c @@ -4,14 +4,14 @@ #include "includes/animations.h" // Son de fond -// static Mix_Music *_ambiance = NULL; +static Mix_Music *_ambiance = NULL; // Dimensions initiales de la fenêtre GLuint _dims[] = {1280, 720}; // Comportement à la fermeture du programme static void closure(void) { - // freeMusic(_ambiance); + freeMusic(_ambiance); gl4duClean(GL4DU_ALL); printf("Merci du visionnage !\n"); @@ -25,7 +25,7 @@ int main(int argc, char *argv[]) { return 1; } - // initMusic(_ambiance, "audio/ambiance.mid"); + initMusic(_ambiance, "audio/ambiance.mid"); // Animations GL4DHanime animations[] = {{7000, lights, NULL, NULL},