diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 19:50:46 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-03 19:50:46 +0100 |
commit | 8c9efb6d586213138def6b8e03ee82c7c24a5527 (patch) | |
tree | a56474b5997d0dd2b92661c20952e8ce24e63095 /src/ft_get_music.c | |
parent | New map, now we die (diff) | |
download | 42-cub3d-8c9efb6d586213138def6b8e03ee82c7c24a5527.tar.gz 42-cub3d-8c9efb6d586213138def6b8e03ee82c7c24a5527.tar.bz2 42-cub3d-8c9efb6d586213138def6b8e03ee82c7c24a5527.tar.xz 42-cub3d-8c9efb6d586213138def6b8e03ee82c7c24a5527.tar.zst 42-cub3d-8c9efb6d586213138def6b8e03ee82c7c24a5527.zip |
Better music command handling
Diffstat (limited to 'src/ft_get_music.c')
-rw-r--r-- | src/ft_get_music.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/ft_get_music.c b/src/ft_get_music.c index eb25af3..280a6c2 100644 --- a/src/ft_get_music.c +++ b/src/ft_get_music.c @@ -21,19 +21,12 @@ static void uint8_t len; len = ft_strlen(mlist->music_path); - if (FT_OS == 2) - len += 22; - else - len += 18; - ft_memdel((void**)&mlist->music_cmd); + len += ft_strlen(FT_MUS_CMD); + ft_memdel((void**)&mlist->music_cmd) - 2; if (!(mlist->music_cmd = (char *)malloc((len + 1) * sizeof(char)))) return ; - if (FT_OS == 2) - { - ft_sprintf(mlist->music_cmd, "aplay -f cd -t wav -q %s", - mlist->music_path); - } - else {} + ft_sprintf(mlist->music_cmd, FT_MUS_CMD, + mlist->music_path); } int8_t |