I tried to load a .wav file(afschieten.wav), but I cant load it. I followed the tutorial of lazyfoo: http://lazyfoo.net/SDL_tutorials/lesson11/
The code:
I got this on top of file:
#include <stdlib.h>
#include "GL/glut.h"
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <time.h>
#include <iostream>
the function I call from main:
void load_files(){
//Load sound effect
fire = Mix_LoadWAV( "afschieten.wav" );
if(fire != NULL)
std::cout << "Sound effect afschieten.wav loaded succesfully" << std::endl;
else
std::cout << "Sound effect afschieten.wav failed loading" << std::endl;
}//load_files
What am I doing wrong? I get no errors when compiling. It says sound effect afschieten.wav failed loading.