filename | src/drivers/audio_sdl.c |
changeset | 1049:e723f379ec88 |
prev | 1024:c67f2d61ab97 |
next | 1161:d3511e94c29f |
author | nkeynes |
date | Fri Jul 31 13:45:32 2009 +1000 (14 years ago) |
permissions | -rw-r--r-- |
last change | Remove or change the level of a bunch of INFO messages that shouldn't really be INFO level |
file | annotate | diff | log | raw |
1.1 --- a/src/drivers/audio_sdl.c Sat Jun 13 00:50:48 2009 +00001.2 +++ b/src/drivers/audio_sdl.c Fri Jul 31 13:45:32 2009 +10001.3 @@ -1,6 +1,6 @@1.4 /**1.5 * $Id$1.6 - *1.7 + *1.8 * The SDL sound driver1.9 *1.10 * Copyright (c) 2009 wahrhaft1.11 @@ -37,10 +37,10 @@1.12 {1.13 int rate = DEFAULT_SAMPLE_RATE;1.14 int format = DEFAULT_SAMPLE_FORMAT;1.15 -1.16 +1.17 SDL_AudioSpec fmt;1.18 fmt.freq = rate;1.19 - if (format & AUDIO_FMT_16BIT)1.20 + if (format & AUDIO_FMT_16BIT)1.21 fmt.format = AUDIO_S16;1.22 else1.23 fmt.format = AUDIO_U8;1.24 @@ -48,11 +48,11 @@1.25 fmt.channels = 2;1.26 else1.27 fmt.channels = 1;1.28 -1.29 +1.30 fmt.samples = SDL_SAMPLES;1.31 fmt.callback = mix_audio;1.32 fmt.userdata = NULL;1.33 -1.34 +1.35 if (SDL_OpenAudio(&fmt, NULL) < 0)1.36 {1.37 ERROR("Unable to open audio output (SDL)");1.38 @@ -65,7 +65,7 @@1.39 ERROR("Could not allocate audio buffer (SDL)");1.40 return FALSE;1.41 }1.42 -1.43 +1.44 return TRUE;1.45 }1.47 @@ -74,7 +74,7 @@1.48 SDL_LockAudio();1.49 if (buffer_pos + buffer->length >= BUFFER_MAX_SIZE)1.50 {1.51 - printf("Audio buffer full, dropping a chunk\n");1.52 + DEBUG("Audio buffer full, dropping a chunk\n");1.53 }1.54 else1.55 {1.56 @@ -83,7 +83,7 @@1.57 }1.58 SDL_UnlockAudio();1.60 - return TRUE;1.61 + return TRUE;1.62 }1.64 static void mix_audio(void *userdata, Uint8 *stream, int len)1.65 @@ -99,7 +99,7 @@1.66 }1.67 else1.68 {1.69 - //printf("Audio buffer low, repeating a chunk\n");1.70 + DEBUG("Audio buffer low, repeating a chunk\n");1.71 }1.72 }1.74 @@ -120,7 +120,7 @@1.75 SDL_PauseAudio(1);1.76 }1.78 -static struct audio_driver audio_sdl_driver = {1.79 +static struct audio_driver audio_sdl_driver = {1.80 "sdl",1.81 N_("SDL sound driver"),1.82 20,
.