mix init check
This commit is contained in:
parent
bfebb9b969
commit
77b584d89f
1 changed files with 5 additions and 1 deletions
|
@ -19,7 +19,11 @@ void callback(void *_, Uint8 *stream, int size) {
|
|||
}
|
||||
|
||||
void initMusic(Mix_Chunk *music, const char *filename) {
|
||||
Mix_Init(MIX_INIT_MID);
|
||||
if (!Mix_Init(MIX_INIT_MID)) {
|
||||
fprintf(stderr, "Erreur Mix_Init\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 1, 2048)) {
|
||||
fprintf(stderr, "Erreur Mix_OpenAudio\n");
|
||||
exit(2);
|
||||
|
|
Reference in a new issue