aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wavbin0 -> 42998482 bytes
-rw-r--r--src/ft_get_music.c1
-rw-r--r--src/ft_music.c11
-rw-r--r--src/ft_treat_args.c3
4 files changed, 12 insertions, 3 deletions
diff --git a/media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav b/media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav
new file mode 100644
index 0000000..758d0e6
--- /dev/null
+++ b/media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav
Binary files differ
diff --git a/src/ft_get_music.c b/src/ft_get_music.c
index b232980..86ec7d6 100644
--- a/src/ft_get_music.c
+++ b/src/ft_get_music.c
@@ -38,5 +38,6 @@ int8_t
ft_sprintf(clist->errmsg, FT_ERR_RD_MUSIC);
return (-1);
}
+ clist->mlist->ismusic = 1;
return (0);
}
diff --git a/src/ft_music.c b/src/ft_music.c
index 2d97f99..cc8d1ca 100644
--- a/src/ft_music.c
+++ b/src/ft_music.c
@@ -14,9 +14,10 @@
#include <cub3d.h>
#include <stddef.h>
#include <stdlib.h>
+#include <pthread.h>
void
- *ft_music(void *vargp)
+ *ft_music_thread(void *vargp)
{
char *cmd;
uint8_t len;
@@ -33,8 +34,14 @@ void
if (FT_OS == 2)
ft_sprintf(cmd, "aplay -f cd -t wav -q %s", cl->mlist->music_path);
else {}
- ft_printf("%s\n", cmd);
+ ft_printf("\n\n========= QWEQWE =========\n%s\n", cmd);
system(cmd);
ft_memdel((void**)&cmd);
+ pthread_exit(NULL);
return (NULL);
}
+
+/* void */
+/* *ft_hooks_thread(void *vargp) */
+/* { */
+/* } */
diff --git a/src/ft_treat_args.c b/src/ft_treat_args.c
index 3a7f217..338b54f 100644
--- a/src/ft_treat_args.c
+++ b/src/ft_treat_args.c
@@ -42,7 +42,8 @@ uint8_t
if (clist->mlist->ismusic)
{
pthread_create(&tid, NULL, ft_music_thread, clist);
- pthread_join(tid, NULL);
+ /* pthread_join(tid, NULL); */
+
}
ft_hooks_and_loops(clist->wlist, clist);
}