diff --git a/src/audio.c b/src/audio.c index 9b6e33c..5153e97 100644 --- a/src/audio.c +++ b/src/audio.c @@ -17,12 +17,13 @@ void callback(void *_, Uint8 *stream, int size) { void initMusic(Mix_Music *music, const char *filename) { Mix_Init(MIX_INIT_MID); - if (Mix_OpenAudio(44100, AUDIO_S16LSB, 1, 1024)) { + if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 1, 2048)) { fprintf(stderr, "Erreur Mix_OpenAudio\n"); exit(2); }; + if (!(music = Mix_LoadMUS(filename))) { - fprintf(stderr, "Erreur Mix_LoadMUS\n"); + fprintf(stderr, "Erreur Mix_LoadMUS for '%s'\n", filename); exit(2); }