aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_get_music.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_get_music.c15
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