diff options
Diffstat (limited to 'src/audio')
| -rw-r--r-- | src/audio/audio.c | 8 | ||||
| -rw-r--r-- | src/audio/music.c | 12 | ||||
| -rw-r--r-- | src/audio/sound.c | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/src/audio/audio.c b/src/audio/audio.c index 9b6d9fc..8e224fd 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -25,15 +25,15 @@ void audio_init() return; } - DEBUG_MSG(_("[Debug] Initializing audio\n")); + debug("Initializing audio"); if (SDL_InitSubSystem(SDL_INIT_AUDIO) == -1) { - fprintf(stderr, _("[Error] Unable to initialize audio: %s\n"), SDL_GetError()); + error("Unable to initialize audio: %s", SDL_GetError()); return; } if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024) == -1) { - fprintf(stderr, _("[Error] Unable to create proper audio settings: %s\n"), Mix_GetError()); + error("Unable to create proper audio settings: %s", Mix_GetError()); return; } @@ -48,7 +48,7 @@ void audio_init() */ void audio_quit() { - DEBUG_MSG(_("[Debug] Shutting down audio\n")); + debug("Shutting down audio"); Mix_CloseAudio(); isAudioInit = TRUE; diff --git a/src/audio/music.c b/src/audio/music.c index 90dd321..9834630 100644 --- a/src/audio/music.c +++ b/src/audio/music.c @@ -33,7 +33,7 @@ void music_init() return; } - DEBUG_MSG(_("[Debug] Initializing music\n")); + debug("Initializing music"); listStorage = storage_new(); currentMusic = NULL; @@ -55,7 +55,7 @@ static Mix_Music *loadMixMusic(char *file) Mix_Music *mixer; char str[STR_PATH_SIZE]; - DEBUG_MSG(_("[Debug] Loading music [%s]\n"), file); + debug("Loading music [%s]", file); if (isFillPath(file)) { strcpy(str, file); @@ -68,7 +68,7 @@ static Mix_Music *loadMixMusic(char *file) mixer = Mix_LoadMUS(str); if (mixer == NULL) { - fprintf(stderr, _("[Error] Unable to load music [%s]\n"), file); + error("Unable to load music [%s]", file); return NULL; } @@ -122,7 +122,7 @@ void music_stop() } if (currentMusic != NULL) { - DEBUG_MSG(_("[Debug] Stopping playing music\n")); + debug("Stopping playing music"); Mix_HaltMusic(); currentMusic = NULL; @@ -163,7 +163,7 @@ void music_play(char *name, char *group) strcpy(currentMusic_name, name); if (currentMusic != NULL) { - DEBUG_MSG(_("[Debug] Playing music [%s]\n"), name); + debug("Playing music [%s]", name); playMixMusic(); } @@ -224,7 +224,7 @@ void music_quit() return; } - DEBUG_MSG(_("[Debug] Shutting down music\n")); + debug("Shutting down music"); music_stop(); storage_destroy(listStorage, destroyMusic); diff --git a/src/audio/sound.c b/src/audio/sound.c index f45ed80..79a152d 100644 --- a/src/audio/sound.c +++ b/src/audio/sound.c @@ -31,7 +31,7 @@ void sound_init() return; } - DEBUG_MSG(_("[Debug] Initializing sound\n")); + debug("Initializing sound"); listStorage = storage_new(); isSoundInit = TRUE; @@ -52,14 +52,14 @@ static Mix_Chunk *loadMixSound(char *file) Mix_Chunk *new; char str[STR_PATH_SIZE]; - DEBUG_MSG(_("[Debug] Loading sound [%s]\n"), file); + debug("Loading sound [%s]", file); sprintf(str, PATH_SOUND "%s", file); accessExistFile(str); new = Mix_LoadWAV(str); if (new == NULL) { - fprintf(stderr, _("[Error] Unable to load sound [%s]: %s\n"), str, Mix_GetError()); + error("Unable to load sound [%s]: %s", str, Mix_GetError()); return NULL; } @@ -72,7 +72,7 @@ static Mix_Chunk *loadMixSound(char *file) static void playMixSound(Mix_Chunk *p) { if (Mix_PlayChannel(-1, p, 0) == -1) { - fprintf(stderr, _("[Error] Unable to play sound: %s\n"), Mix_GetError()); + error("Unable to play sound: %s", Mix_GetError()); return; } } @@ -141,7 +141,7 @@ void sound_quit() return; } - DEBUG_MSG(_("[Debug] Shutting down sound\n")); + debug("Shutting down sound"); storage_destroy(listStorage, destroySound); isSoundInit = FALSE; |