diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-02 01:35:28 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-02 01:35:28 +0100 |
commit | 4a924bfb871ed850eccf85fe122bb8120f0ef36a (patch) | |
tree | fbb562d9ce4c010fe0fb57274e063c5ca0e6c57f | |
parent | ok (diff) | |
download | 42-cub3d-4a924bfb871ed850eccf85fe122bb8120f0ef36a.tar.gz 42-cub3d-4a924bfb871ed850eccf85fe122bb8120f0ef36a.tar.bz2 42-cub3d-4a924bfb871ed850eccf85fe122bb8120f0ef36a.tar.xz 42-cub3d-4a924bfb871ed850eccf85fe122bb8120f0ef36a.tar.zst 42-cub3d-4a924bfb871ed850eccf85fe122bb8120f0ef36a.zip |
OSEF again
Diffstat (limited to '')
-rw-r--r-- | media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav | bin | 0 -> 42998482 bytes | |||
-rw-r--r-- | src/ft_get_music.c | 1 | ||||
-rw-r--r-- | src/ft_music.c | 11 | ||||
-rw-r--r-- | src/ft_treat_args.c | 3 |
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 Binary files differnew file mode 100644 index 0000000..758d0e6 --- /dev/null +++ b/media/sound/TAPE-DU-PIED-ET-FRAPPE-TA-TANTE.wav 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); } |