audio looping fix
This commit is contained in:
+4
-4
@@ -16,7 +16,7 @@ Mix_Music *prout;
|
||||
|
||||
static void space(void) {
|
||||
printf("space!\n");
|
||||
if(Mix_PlayMusic(prout, -1) != 0){
|
||||
if(Mix_PlayMusic(prout, 0) != 0){
|
||||
printf("Music sound could not be played!\n"
|
||||
"SDL_Error: %s\n", Mix_GetError());
|
||||
Mix_FreeMusic(prout);
|
||||
@@ -40,8 +40,8 @@ static void game_main(void) {
|
||||
SDL_Surface* img = IMG_Load("./assets/img/pp.png");
|
||||
|
||||
RenderObject_t duck = {
|
||||
0.2,
|
||||
0.2,
|
||||
0.25,
|
||||
0.25,
|
||||
0,
|
||||
0.50,
|
||||
0.50,
|
||||
@@ -69,7 +69,7 @@ int main(void) {
|
||||
running = false;
|
||||
}
|
||||
|
||||
prout = Mix_LoadMUS("./assets/music/pet.mp3");
|
||||
prout = Mix_LoadMUS("./assets/music/jojo arab.mp3");
|
||||
if(prout == NULL) {
|
||||
fprintf(stderr, "Prout not found!\n");
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user