use default values

This commit is contained in:
Mylloon 2023-05-03 18:38:41 +02:00
parent 555776304c
commit 1a51807564
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -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);
}