aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_init_sfx.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 15:09:59 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 15:09:59 +0100
commit163bed0c8988ff020b746bf96dc01dd2058dc4f9 (patch)
tree724090f6319cc6d0336eb2a5b501bd032599d295 /src/ft_init_sfx.c
parentok (diff)
download42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.gz
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.bz2
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.xz
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.zst
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.zip
Footsteps are bav
Diffstat (limited to 'src/ft_init_sfx.c')
-rw-r--r--src/ft_init_sfx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ft_init_sfx.c b/src/ft_init_sfx.c
index e1e9b7f..35ab57d 100644
--- a/src/ft_init_sfx.c
+++ b/src/ft_init_sfx.c
@@ -36,16 +36,20 @@ int8_t
ft_init_sfx(t_sfx *sfx)
{
if (ft_init_sfx_cmd(&sfx->death, FT_SFX_DEATH_PATH) < 0 ||
+ ft_init_sfx_cmd(&sfx->footstep_one, FT_SFX_FS_ONE_PATH) < 0 ||
+ ft_init_sfx_cmd(&sfx->footstep_two, FT_SFX_FS_TWO_PATH) < 0 ||
ft_init_sfx_cmd(&sfx->new_lvl, FT_SFX_N_LVL_PATH) < 0 ||
ft_init_sfx_cmd(&sfx->pain_one, FT_SFX_SCR_ONE_PATH) < 0 ||
ft_init_sfx_cmd(&sfx->pain_two, FT_SFX_SCR_TWO_PATH) < 0 ||
ft_init_sfx_cmd(&sfx->trap, FT_SFX_TRAP_PATH) < 0)
return (-1);
pthread_mutex_init(&sfx->death_mutex, NULL);
+ pthread_mutex_init(&sfx->footstep_mutex, NULL);
pthread_mutex_init(&sfx->new_lvl_mutex, NULL);
pthread_mutex_init(&sfx->pain_mutex, NULL);
pthread_mutex_init(&sfx->trap_mutex, NULL);
pthread_create(&sfx->death_tid, NULL, ft_sfx_death_thread, sfx);
+ pthread_create(&sfx->footstep_tid, NULL, ft_sfx_footstep_thread, sfx);
pthread_create(&sfx->new_lvl_tid, NULL, ft_sfx_new_lvl_thread, sfx);
pthread_create(&sfx->pain_tid, NULL, ft_sfx_pain_thread, sfx);
pthread_create(&sfx->trap_tid, NULL, ft_sfx_trap_thread, sfx);