diff options
Diffstat (limited to '')
-rw-r--r-- | src/ft_music.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/ft_music.c b/src/ft_music.c index 4d25a3a..f1801f9 100644 --- a/src/ft_music.c +++ b/src/ft_music.c @@ -11,19 +11,21 @@ /* ************************************************************************** */ #include <libft.h> -#include <cub3d.h> +#include <stddef.h> #include <stdlib.h> - #include <unistd.h> void - ft_music_fork(char *music_cmd) + ft_music_fork(char **mcmd_words) { - while (1) - { - ft_printf("%s\n", music_cmd); - sleep(1); - } - /* execve here */ - /* system(cl->mlist.music_cmd); */ + /* execve(2) here */ + + char *arg[4]; + + arg[0] = "/bin/sh"; + arg[1] = "-c"; + arg[2] = "aplay ./media/sound/DEVANT-LES-KAISSONS.wav"; + arg[3] = NULL; + (void)mcmd_words; + execve("/bin/sh", &arg[0], NULL); } |