From 054ddfd0c6735505920690d51da2d9b32e1e47ae Mon Sep 17 00:00:00 2001 From: Jeffrey Goode Date: Tue, 4 May 2010 14:41:30 +0000 Subject: 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 --- uisimulator/sdl/sound.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'uisimulator') diff --git a/uisimulator/sdl/sound.c b/uisimulator/sdl/sound.c index 8d9dbeb743..a370ed83f5 100644 --- a/uisimulator/sdl/sound.c +++ b/uisimulator/sdl/sound.c @@ -24,7 +24,6 @@ #include #include #include -#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); } -- cgit