diff options
-rw-r--r-- | firmware/target/hosted/sdl/pcm-sdl.c | 10 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/system-sdl.c | 1 |
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> |
39 | extern bool debug_audio; | 42 | extern bool debug_audio; |
@@ -49,7 +52,7 @@ static size_t pcm_data_size; | |||
49 | static size_t pcm_sample_bytes; | 52 | static size_t pcm_sample_bytes; |
50 | static size_t pcm_channel_bytes; | 53 | static size_t pcm_channel_bytes; |
51 | 54 | ||
52 | struct pcm_udata | 55 | static 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 | ||
127 | void write_to_soundcard(struct pcm_udata *udata) | 130 | static 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 | ||
217 | void sdl_audio_callback(struct pcm_udata *udata, Uint8 *stream, int len) | 220 | static 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" |