diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 22:08:37 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-06 22:08:37 +0100 |
commit | d68996487117fee33bd6301f66c06611e57f0c71 (patch) | |
tree | f4a2bc882dd7667e2c9758e2be38e3484879e225 | |
parent | Good (diff) | |
download | 42-cub3d-d68996487117fee33bd6301f66c06611e57f0c71.tar.gz 42-cub3d-d68996487117fee33bd6301f66c06611e57f0c71.tar.bz2 42-cub3d-d68996487117fee33bd6301f66c06611e57f0c71.tar.xz 42-cub3d-d68996487117fee33bd6301f66c06611e57f0c71.tar.zst 42-cub3d-d68996487117fee33bd6301f66c06611e57f0c71.zip |
okok
-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 |