diff options
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r-- | apps/debug_menu.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index e7067cc055..4c36eaa113 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -209,7 +209,7 @@ extern int filebuflen; | |||
209 | extern int filebufused; | 209 | extern int filebufused; |
210 | extern int track_count; | 210 | extern int track_count; |
211 | 211 | ||
212 | static int ticks, boost_ticks; | 212 | static unsigned int ticks, boost_ticks; |
213 | 213 | ||
214 | void dbg_audio_task(void) | 214 | void dbg_audio_task(void) |
215 | { | 215 | { |
@@ -225,7 +225,8 @@ bool dbg_audio_thread(void) | |||
225 | int button; | 225 | int button; |
226 | int line; | 226 | int line; |
227 | bool done = false; | 227 | bool done = false; |
228 | int bufsize = pcmbuf_get_bufsize(); | 228 | size_t bufsize = pcmbuf_get_bufsize(); |
229 | int pcmbufdescs = pcmbuf_descs(); | ||
229 | 230 | ||
230 | ticks = boost_ticks = 0; | 231 | ticks = boost_ticks = 0; |
231 | 232 | ||
@@ -239,6 +240,12 @@ bool dbg_audio_thread(void) | |||
239 | button = button_get_w_tmo(HZ/5); | 240 | button = button_get_w_tmo(HZ/5); |
240 | switch(button) | 241 | switch(button) |
241 | { | 242 | { |
243 | case SETTINGS_NEXT: | ||
244 | audio_next(); | ||
245 | break; | ||
246 | case SETTINGS_PREV: | ||
247 | audio_prev(); | ||
248 | break; | ||
242 | case SETTINGS_CANCEL: | 249 | case SETTINGS_CANCEL: |
243 | done = true; | 250 | done = true; |
244 | break; | 251 | break; |
@@ -248,8 +255,8 @@ bool dbg_audio_thread(void) | |||
248 | 255 | ||
249 | lcd_clear_display(); | 256 | lcd_clear_display(); |
250 | 257 | ||
251 | snprintf(buf, sizeof(buf), "pcm: %d/%d", | 258 | snprintf(buf, sizeof(buf), "pcm: %7ld/%7ld", |
252 | bufsize-(int)audiobuffer_free, bufsize); | 259 | bufsize-audiobuffer_free, bufsize); |
253 | lcd_puts(0, line++, buf); | 260 | lcd_puts(0, line++, buf); |
254 | 261 | ||
255 | /* Playable space left */ | 262 | /* Playable space left */ |
@@ -257,7 +264,7 @@ bool dbg_audio_thread(void) | |||
257 | bufsize-audiobuffer_free, HORIZONTAL); | 264 | bufsize-audiobuffer_free, HORIZONTAL); |
258 | line++; | 265 | line++; |
259 | 266 | ||
260 | snprintf(buf, sizeof(buf), "codec: %d/%d", filebufused, filebuflen); | 267 | snprintf(buf, sizeof(buf), "codec: %8d/%8d", filebufused, filebuflen); |
261 | lcd_puts(0, line++, buf); | 268 | lcd_puts(0, line++, buf); |
262 | 269 | ||
263 | /* Playable space left */ | 270 | /* Playable space left */ |
@@ -265,17 +272,21 @@ bool dbg_audio_thread(void) | |||
265 | filebufused, HORIZONTAL); | 272 | filebufused, HORIZONTAL); |
266 | line++; | 273 | line++; |
267 | 274 | ||
268 | snprintf(buf, sizeof(buf), "track count: %d", track_count); | 275 | snprintf(buf, sizeof(buf), "track count: %2d", track_count); |
269 | lcd_puts(0, line++, buf); | 276 | lcd_puts(0, line++, buf); |
270 | 277 | ||
271 | snprintf(buf, sizeof(buf), "cpu freq: %dMHz", | 278 | snprintf(buf, sizeof(buf), "cpu freq: %3dMHz", |
272 | (int)((FREQ + 500000) / 1000000)); | 279 | (int)((FREQ + 500000) / 1000000)); |
273 | lcd_puts(0, line++, buf); | 280 | lcd_puts(0, line++, buf); |
274 | 281 | ||
275 | snprintf(buf, sizeof(buf), "boost ratio: %d%%", | 282 | snprintf(buf, sizeof(buf), "boost ratio: %3d%%", |
276 | boost_ticks * 100 / ticks); | 283 | boost_ticks * 100 / ticks); |
277 | lcd_puts(0, line++, buf); | 284 | lcd_puts(0, line++, buf); |
278 | 285 | ||
286 | snprintf(buf, sizeof(buf), "pcmbufdesc: %2d/%2d", | ||
287 | pcmbuf_used_descs(), pcmbufdescs); | ||
288 | lcd_puts(0, line++, buf); | ||
289 | |||
279 | lcd_update(); | 290 | lcd_update(); |
280 | } | 291 | } |
281 | 292 | ||