-
Notifications
You must be signed in to change notification settings - Fork 0
/
bg_music.c
32 lines (29 loc) · 1.13 KB
/
bg_music.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* bg_music.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hgrissen <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/02/14 17:48:37 by hgrissen #+# #+# */
/* Updated: 2021/02/19 14:46:16 by hgrissen ### ########.fr */
/* */
/* ************************************************************************** */
#include "cub3d.h"
void play_m(void)
{
char *afplay[3];
int pid;
afplay[0] = "/usr/bin/afplay";
afplay[1] = "./music/deja_vu_bgm.mp3";
afplay[2] = 0;
if (BON)
{
if ((pid = fork()) == 0)
{
execve(afplay[0], afplay, NULL);
}
else
g_pid = pid;
}
}