-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmusic_mix.c
27 lines (23 loc) · 1.25 KB
/
music_mix.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* music_mix.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccastill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/01 06:42:17 by ccastill #+# #+# */
/* Updated: 2020/06/01 08:01:42 by ccastill ### ########.fr */
/* */
/* ************************************************************************** */
#include "Nostromo.h"
void music_mix()
{
SDL_Init(SDL_INIT_AUDIO);
Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 2, 2048);
//Música y efecto de sonido
Mix_Music *backgroundSound = Mix_LoadMUS("bsoalien.wav");
Mix_Chunk *jumpEffect = Mix_LoadWAV("sound1.wav");
//Reproducir música y efecto de sonido
Mix_PlayMusic(backgroundSound, -1);
Mix_PlayChannel(-1,jumpEffect ,2);
}