diff options
-rw-r--r-- | inc/cub3d_defines.h | 4 | ||||
-rw-r--r-- | src/ft_music.c | 10 |
2 files changed, 4 insertions, 10 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index fb50474..1153225 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -83,9 +83,9 @@ enum */ # if FT_OS == 1 -# define FT_MUS_CMD "afplay --volume 0.2 %s" +# define FT_MUS_CMD "/usr/bin/afplay --volume 0.2 %s" # else -# define FT_MUS_CMD "aplay -f cd -t wav -q %s" +# define FT_MUS_CMD "/usr/bin/aplay -f cd -t wav -q %s" # endif /* diff --git a/src/ft_music.c b/src/ft_music.c index 3104978..c3b90b1 100644 --- a/src/ft_music.c +++ b/src/ft_music.c @@ -13,17 +13,11 @@ #include <cub3d.h> #include <unistd.h> +#include <libft.h> void ft_music_fork(char **mcmd_words, char *const envp[]) { - if (FT_OS == 1) - { - execve("/usr/bin/afplay", mcmd_words, envp); - } - else - { - execve("/usr/bin/aplay", mcmd_words, envp); - } + execve(*(mcmd_words + 0), mcmd_words, envp); } void |