diff options
| author | scarab <scarab@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-08-15 19:57:10 +0000 |
|---|---|---|
| committer | scarab <scarab@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-08-15 19:57:10 +0000 |
| commit | 7bbd60007620cf3cc3ee7a913f7010588808ebb2 (patch) | |
| tree | 34e72f66dfd1076e23c43074786f935aca70cba1 /src/audio/audio.c | |
| parent | 50ba3d5e1e9f9eeda049a348efa4645af07610bc (diff) | |
"- initial commit for GETTEXT support and K&R compilance"
git-svn-id: http://opensvn.csie.org/tuxanci_ng@196 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/audio/audio.c')
| -rw-r--r-- | src/audio/audio.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/audio/audio.c b/src/audio/audio.c index 8397788..9436791 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -8,37 +8,42 @@ #include "interface.h" static bool_t isAudioInit = FALSE; - +/* + * Returns state of audio + */ bool_t isAudioInicialized() { return isAudioInit; } - +/* + * Inicialize audio + */ void initAudio() { - if( SDL_Init(SDL_INIT_AUDIO) == -1 ) - { - fprintf(stderr, "Nelze inicializovat audio : %s\n", SDL_GetError()); + if (SDL_Init(SDL_INIT_AUDIO) == -1) { + fprintf(stderr, _("Unable to initialize audio: %s\n"), SDL_GetError()); return; } - - if( Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024) == -1 ) - { - fprintf(stderr, "Nelze inicializovat audio : %s\n", Mix_GetError()); - return; + if (Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT, 2, 1024) == -1) { + fprintf(stderr, _("Unable to create proper audio settings: %s\n"), Mix_GetError()); + return; } - Mix_AllocateChannels(16); Mix_Volume(-1, MIX_MAX_VOLUME); - - printf("init audio..\n"); +#ifdef DEBUG + printf(_("Initializing audio system...\n")); +#endif isAudioInit = TRUE; } - +/* + * Quit audio + */ void quitAudio() { Mix_CloseAudio(); isAudioInit = TRUE; - printf("quit audio..\n"); +#ifdef DEBUG + printf(_("Quitting audio...\n")); +#endif } |