use default values
This commit is contained in:
parent
555776304c
commit
1a51807564
1 changed files with 3 additions and 2 deletions
|
@ -17,12 +17,13 @@ void callback(void *_, Uint8 *stream, int size) {
|
||||||
|
|
||||||
void initMusic(Mix_Music *music, const char *filename) {
|
void initMusic(Mix_Music *music, const char *filename) {
|
||||||
Mix_Init(MIX_INIT_MID);
|
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");
|
fprintf(stderr, "Erreur Mix_OpenAudio\n");
|
||||||
exit(2);
|
exit(2);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!(music = Mix_LoadMUS(filename))) {
|
if (!(music = Mix_LoadMUS(filename))) {
|
||||||
fprintf(stderr, "Erreur Mix_LoadMUS\n");
|
fprintf(stderr, "Erreur Mix_LoadMUS for '%s'\n", filename);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue