diff options
| author | Jeffrey Goode <jeffg7@gmail.com> | 2010-05-04 14:41:30 +0000 |
|---|---|---|
| committer | Jeffrey Goode <jeffg7@gmail.com> | 2010-05-04 14:41:30 +0000 |
| commit | 054ddfd0c6735505920690d51da2d9b32e1e47ae (patch) | |
| tree | 29b099f481e7b3c08c891c2cd3d19f15b00a4d47 | |
| parent | 433cad644601f871dcc207b78aab4e239502fa9a (diff) | |
| download | rockbox-054ddfd0c6735505920690d51da2d9b32e1e47ae.zip rockbox-054ddfd0c6735505920690d51da2d9b32e1e47ae.tar.gz rockbox-054ddfd0c6735505920690d51da2d9b32e1e47ae.tar.bz2 rockbox-054ddfd0c6735505920690d51da2d9b32e1e47ae.tar.xz | |
Make some internal things static, add logf line to sound.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25809 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | uisimulator/sdl/sound.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/uisimulator/sdl/sound.c b/uisimulator/sdl/sound.c index 8d9dbeb..a370ed8 100644 --- a/uisimulator/sdl/sound.c +++ b/uisimulator/sdl/sound.c @@ -24,7 +24,6 @@ #include <stdlib.h> #include <stdbool.h> #include <memory.h> -#include "debug.h" #include "kernel.h" #include "sound.h" #include "audiohw.h" @@ -33,6 +32,9 @@ #include "pcm_sampr.h" #include "SDL.h" +/*#define LOGF_ENABLE*/ +#include "logf.h" + static int sim_volume = 0; #if CONFIG_CODEC == SWCODEC @@ -43,7 +45,7 @@ static size_t pcm_data_size; static size_t pcm_sample_bytes; static size_t pcm_channel_bytes; -struct pcm_udata +static struct pcm_udata { Uint8 *stream; Uint32 num_in; @@ -121,7 +123,7 @@ size_t pcm_get_bytes_waiting(void) } extern int sim_volume; /* in firmware/sound.c */ -void write_to_soundcard(struct pcm_udata *udata) { +static void write_to_soundcard(struct pcm_udata *udata) { if (debug_audio && (udata->debug == NULL)) { udata->debug = fopen("audiodebug.raw", "ab"); DEBUGF("Audio debug file open\n"); @@ -206,8 +208,9 @@ void write_to_soundcard(struct pcm_udata *udata) { } } -void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) +static void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) { + logf("sdl_audio_callback: len %d, pcm %d\n", len, pcm_data_size); udata->stream = stream; /* Write what we have in the PCM buffer */ @@ -218,7 +221,6 @@ void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) while (len > 0) { if ((ssize_t)pcm_data_size <= 0) { pcm_data_size = 0; - if (pcm_callback_for_more) pcm_callback_for_more(&pcm_data, &pcm_data_size); } |