summaryrefslogtreecommitdiff
path: root/firmware/target/hosted
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-05-17 21:43:06 +0000
committerThomas Martitz <kugel@rockbox.org>2010-05-17 21:43:06 +0000
commit86e19dd65d18c921effa762de74d671f333dcfce (patch)
tree852c50714fe70721eb18d72f8495e762eed1f52a /firmware/target/hosted
parent36e52604b061f281863737ca78ef6c3b1fab11b9 (diff)
downloadrockbox-86e19dd65d18c921effa762de74d671f333dcfce.tar.gz
rockbox-86e19dd65d18c921effa762de74d671f333dcfce.zip
Restore changes of r25809 that got lost in the target tree movement and fix simulator build on cygwin.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26120 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted')
-rw-r--r--firmware/target/hosted/sdl/pcm-sdl.c10
-rw-r--r--firmware/target/hosted/sdl/system-sdl.c1
2 files changed, 8 insertions, 3 deletions
diff --git a/firmware/target/hosted/sdl/pcm-sdl.c b/firmware/target/hosted/sdl/pcm-sdl.c
index 1772db94f4..ee92fa208d 100644
--- a/firmware/target/hosted/sdl/pcm-sdl.c
+++ b/firmware/target/hosted/sdl/pcm-sdl.c
@@ -34,6 +34,9 @@
34#include "pcm.h" 34#include "pcm.h"
35#include "pcm_sampr.h" 35#include "pcm_sampr.h"
36 36
37/*#define LOGF_ENABLE*/
38#include "logf.h"
39
37#ifdef DEBUG 40#ifdef DEBUG
38#include <stdio.h> 41#include <stdio.h>
39extern bool debug_audio; 42extern bool debug_audio;
@@ -49,7 +52,7 @@ static size_t pcm_data_size;
49static size_t pcm_sample_bytes; 52static size_t pcm_sample_bytes;
50static size_t pcm_channel_bytes; 53static size_t pcm_channel_bytes;
51 54
52struct pcm_udata 55static struct pcm_udata
53{ 56{
54 Uint8 *stream; 57 Uint8 *stream;
55 Uint32 num_in; 58 Uint32 num_in;
@@ -124,7 +127,7 @@ size_t pcm_get_bytes_waiting(void)
124 return pcm_data_size; 127 return pcm_data_size;
125} 128}
126 129
127void write_to_soundcard(struct pcm_udata *udata) 130static void write_to_soundcard(struct pcm_udata *udata)
128{ 131{
129#ifdef DEBUG 132#ifdef DEBUG
130 if (debug_audio && (udata->debug == NULL)) { 133 if (debug_audio && (udata->debug == NULL)) {
@@ -214,8 +217,9 @@ void write_to_soundcard(struct pcm_udata *udata)
214 } 217 }
215} 218}
216 219
217void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) 220static void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len)
218{ 221{
222 logf("sdl_audio_callback: len %d, pcm %d\n", len, pcm_data_size);
219 udata->stream = stream; 223 udata->stream = stream;
220 224
221 /* Write what we have in the PCM buffer */ 225 /* Write what we have in the PCM buffer */
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c
index 3d67de425b..95bfa5984a 100644
--- a/firmware/target/hosted/sdl/system-sdl.c
+++ b/firmware/target/hosted/sdl/system-sdl.c
@@ -23,6 +23,7 @@
23#include <stdlib.h> 23#include <stdlib.h>
24#include <string.h> 24#include <string.h>
25#include <setjmp.h> 25#include <setjmp.h>
26#include <inttypes.h>
26#include "system-sdl.h" 27#include "system-sdl.h"
27#include "thread-sdl.h" 28#include "thread-sdl.h"
28#include "sim-ui-defines.h" 29#include "sim-ui-defines.h"